announcements 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,10 @@
1
+ .DS_Store
2
+ .bundle
3
+ db/*.sqlite3
4
+ log/*.log
5
+ tmp/
6
+ .sass-cache/
7
+ .idea/
1
8
  *.gem
2
9
  .bundle
3
10
  Gemfile.lock
data/README.md CHANGED
@@ -1,11 +1,12 @@
1
1
  # announcements
2
2
 
3
- The Announcements gem provides an easy way to publish short messages in your views, which the user can then hide permanently. It is influenced by the gem `paul_revere` by thoughtbot, but is
4
- much much simpler - no partials used, 'type' attribute for different types of announcements, and others.
3
+ The Announcements gem provides an easy way to publish short messages in your views, which the user can then hide permanently.
4
+ It was influenced by the gem `paul_revere` by thoughtbot, but unlike `paul_revere`, `announcements` doesn't use partials (instead,
5
+ there is a single helper method which you can customise) and is a bit more flexible (you have an additional 'type' attribute by default).
5
6
 
6
7
  ## Quick start
7
8
 
8
- 1. Requirements: rails >= 3.1.0 and jquery
9
+ 1. Requirements: rails >= 3.1.0 and jquery-rails
9
10
  2. Add `gem 'announcements'` to your Gemfile and run `bundle`
10
11
  3. Run `rails g announcements:install`
11
12
  4. Use `<%= announce Announcement.newest %>` in your views to display the latest announcement
@@ -45,13 +46,13 @@ The default HTML output of the `announce` helper is
45
46
 
46
47
  The default div class is `info`. You can specify you own like that:
47
48
 
48
- ```ruby
49
+ ```
49
50
  <%= announce Announcement.newest, :div_class => "mydiv" %>
50
51
  ```
51
52
 
52
53
  You can also change the "hide message" text:
53
54
 
54
- ```ruby
55
+ ```
55
56
  <%= announce Announcement.newest, :div_class => "mydiv", :hide_message => "X" %>
56
57
  ```
57
58
 
@@ -1,25 +1,26 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "announcements/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "announcements"
7
- s.version = Announcements::VERSION
8
- s.authors = ["Svilen Gospodinov"]
9
- s.email = ["svilen@gospodinov.co.uk"]
10
- s.homepage = ""
11
- s.summary = "Announcements gem for Rails"
12
- s.description = "The Announcements gem makes it easier to display short announcement messages in your views"
13
-
14
- s.rubyforge_project = "announcements"
15
-
16
- s.files = `git ls-files`.split("\n")
17
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
- s.require_paths = ["lib"]
20
-
21
- # specify any dependencies here; for example:
22
- # s.add_development_dependency "rspec"
23
- s.add_runtime_dependency "rails", "~> 3.1"
24
-
25
- end
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "announcements/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "announcements"
7
+ s.version = Announcements::VERSION
8
+ s.authors = ["Svilen Gospodinov"]
9
+ s.email = ["svilen@gospodinov.co.uk"]
10
+ s.homepage = ""
11
+ s.summary = "Announcements gem for Rails"
12
+ s.description = "The Announcements gem makes it easier to display short announcement messages in your views"
13
+
14
+ s.rubyforge_project = "announcements"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ # specify any dependencies here; for example:
22
+ # s.add_development_dependency "rspec"
23
+ s.add_runtime_dependency "rails", "~> 3.1"
24
+ s.add_runtime_dependency "jquery-rails"
25
+
26
+ end
@@ -1,3 +1,3 @@
1
- module Announcements
2
- VERSION = "0.0.2"
3
- end
1
+ module Announcements
2
+ VERSION = "0.0.3"
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: announcements
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-22 00:00:00.000000000Z
12
+ date: 2012-01-24 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &25371696 !ruby/object:Gem::Requirement
16
+ requirement: &28996596 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,18 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *25371696
24
+ version_requirements: *28996596
25
+ - !ruby/object:Gem::Dependency
26
+ name: jquery-rails
27
+ requirement: &28996212 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *28996212
25
36
  description: The Announcements gem makes it easier to display short announcement messages
26
37
  in your views
27
38
  email: