Skip to content

Commit

Permalink
Add gem stuff & bump to 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
estum committed May 29, 2015
1 parent 5ad2f82 commit 6ce161a
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 14 deletions.
13 changes: 13 additions & 0 deletions CODE_OF_CONDUCT.md
@@ -0,0 +1,13 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
1 change: 0 additions & 1 deletion Gemfile
Expand Up @@ -4,7 +4,6 @@ source 'https://rubygems.org'
gemspec

gem 'rails', '>= 3.2.0', '<= 5.0.0'
gem 'rake', require: false

group :test do
gem 'minitest'
Expand Down
21 changes: 21 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Tõnis Simo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -34,7 +34,7 @@ Import Growlyflash style in `app/assets/stylesheets/application.css.scss` after
@import "growlyflash";
```

To use text flash messages as growl notifications with XHR request, add `use_growlyflash` to your controllers (usually `application_controller.rb`). This is a shorthand for `append_after_filter :flash_to_header, if: :is_xhr_request?` and takes callback parameters like `only`, `except`, `if` or `unless`:
To use text flash messages as growl notifications with XHR request, add `use_growlyflash` to your controllers (usually `application_controller.rb`). This is a shorthand for `append_after_filter :flash_to_header, if: "request.xhr?"` and takes callback parameters like `only`, `except`, `if` or `unless`:

```ruby
use_growlyflash # except: %i[actions without growlyflash]
Expand Down Expand Up @@ -76,7 +76,7 @@ $growlyflash-zindex: 9999 !default;
@import "growlyflash";
```

Insert the following if you want to close alert boxes by clicking on themselves.
Insert the following if you want to close alert boxes by clicking on themselves.
Also it doesn't steel focus from toggled elements like dropdowns and works fine with touch devices, so I advise to use it:

```coffee
Expand Down
22 changes: 12 additions & 10 deletions growlyflash.gemspec
Expand Up @@ -2,23 +2,25 @@

lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "growlyflash/version"

Gem::Specification.new do |spec|
spec.name = 'growlyflash'
spec.version = '0.6.2'
spec.version = Growlyflash::VERSION
spec.authors = ['Tõnis Simo']
spec.email = ['anton.estum@gmail.com']
spec.summary = %q{Growl-styled flash messages for Ruby on Rails with Bootstrap.}
spec.description = %q{Growl-styled flash messages for Ruby on Rails with Bootstrap. For XHR requests flash messages are transfering in 'X-Messages' headers, otherwise they are storing in js variables.}
spec.homepage = 'https://github.com/estum/growlyflash'
spec.summary = %q{Tiny gem which provides growl-styled flash messages for Ruby on Rails with Bootstrap.}
spec.description = %q{Tiny gem which provides growl-styled flash messages for Ruby on Rails with Bootstrap. For XHR requests flash messages are transfering in 'X-Messages' headers, otherwise they are storing in js variables.}
spec.license = 'MIT'

spec.files = `git ls-files`.split($/)
spec.require_paths = %w[app lib]
spec.test_files = Dir['test/**/*']

spec.license = "MIT"

spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 1.9.3"

spec.add_dependency 'railties', '>= 3.2', '< 5.0'
spec.add_dependency 'coffee-rails', '>= 3.2.1'
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
end
6 changes: 5 additions & 1 deletion lib/growlyflash.rb
@@ -1,2 +1,6 @@
require 'growlyflash/version'
require 'growlyflash/controller_additions'
require 'growlyflash/engine' if defined?(Rails)
require 'growlyflash/engine' if defined?(Rails)

module Growlyflash
end
3 changes: 3 additions & 0 deletions lib/growlyflash/version.rb
@@ -0,0 +1,3 @@
module Growlyflash
VERSION = "0.7.0"
end

0 comments on commit 6ce161a

Please sign in to comment.