message_block 1.1.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG ADDED
@@ -0,0 +1,5 @@
1
+ == Version 2.0.0 (Feburary 8, 2013)
2
+
3
+ * Converted assets to use the asset pipeline (instead of a rake task to copy
4
+ assets)
5
+
data/Gemfile.lock CHANGED
@@ -1,71 +1,79 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- message_block (1.0.4)
5
- rails (>= 3.0.0)
4
+ message_block (2.0.0)
5
+ rails (>= 3.1.0)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- abstract (1.0.0)
11
- actionmailer (3.0.3)
12
- actionpack (= 3.0.3)
13
- mail (~> 2.2.9)
14
- actionpack (3.0.3)
15
- activemodel (= 3.0.3)
16
- activesupport (= 3.0.3)
17
- builder (~> 2.1.2)
18
- erubis (~> 2.6.6)
19
- i18n (~> 0.4)
20
- rack (~> 1.2.1)
21
- rack-mount (~> 0.6.13)
22
- rack-test (~> 0.5.6)
23
- tzinfo (~> 0.3.23)
24
- activemodel (3.0.3)
25
- activesupport (= 3.0.3)
26
- builder (~> 2.1.2)
27
- i18n (~> 0.4)
28
- activerecord (3.0.3)
29
- activemodel (= 3.0.3)
30
- activesupport (= 3.0.3)
31
- arel (~> 2.0.2)
32
- tzinfo (~> 0.3.23)
33
- activeresource (3.0.3)
34
- activemodel (= 3.0.3)
35
- activesupport (= 3.0.3)
36
- activesupport (3.0.3)
37
- arel (2.0.10)
38
- builder (2.1.2)
10
+ actionmailer (3.2.11)
11
+ actionpack (= 3.2.11)
12
+ mail (~> 2.4.4)
13
+ actionpack (3.2.11)
14
+ activemodel (= 3.2.11)
15
+ activesupport (= 3.2.11)
16
+ builder (~> 3.0.0)
17
+ erubis (~> 2.7.0)
18
+ journey (~> 1.0.4)
19
+ rack (~> 1.4.0)
20
+ rack-cache (~> 1.2)
21
+ rack-test (~> 0.6.1)
22
+ sprockets (~> 2.2.1)
23
+ activemodel (3.2.11)
24
+ activesupport (= 3.2.11)
25
+ builder (~> 3.0.0)
26
+ activerecord (3.2.11)
27
+ activemodel (= 3.2.11)
28
+ activesupport (= 3.2.11)
29
+ arel (~> 3.0.2)
30
+ tzinfo (~> 0.3.29)
31
+ activeresource (3.2.11)
32
+ activemodel (= 3.2.11)
33
+ activesupport (= 3.2.11)
34
+ activesupport (3.2.11)
35
+ i18n (~> 0.6)
36
+ multi_json (~> 1.0)
37
+ arel (3.0.2)
38
+ builder (3.0.4)
39
39
  diff-lcs (1.1.2)
40
- erubis (2.6.6)
41
- abstract (>= 1.0.0)
42
- i18n (0.6.0)
43
- mail (2.2.19)
44
- activesupport (>= 2.3.6)
40
+ erubis (2.7.0)
41
+ hike (1.2.1)
42
+ i18n (0.6.1)
43
+ journey (1.0.4)
44
+ json (1.7.6)
45
+ mail (2.4.4)
45
46
  i18n (>= 0.4.0)
46
47
  mime-types (~> 1.16)
47
48
  treetop (~> 1.4.8)
48
- mime-types (1.16)
49
+ mime-types (1.20.1)
50
+ multi_json (1.5.0)
49
51
  polyglot (0.3.3)
50
- rack (1.2.1)
51
- rack-mount (0.6.14)
52
- rack (>= 1.0.0)
53
- rack-test (0.5.6)
52
+ rack (1.4.4)
53
+ rack-cache (1.2)
54
+ rack (>= 0.4)
55
+ rack-ssl (1.3.3)
56
+ rack
57
+ rack-test (0.6.2)
54
58
  rack (>= 1.0)
55
- rails (3.0.3)
56
- actionmailer (= 3.0.3)
57
- actionpack (= 3.0.3)
58
- activerecord (= 3.0.3)
59
- activeresource (= 3.0.3)
60
- activesupport (= 3.0.3)
59
+ rails (3.2.11)
60
+ actionmailer (= 3.2.11)
61
+ actionpack (= 3.2.11)
62
+ activerecord (= 3.2.11)
63
+ activeresource (= 3.2.11)
64
+ activesupport (= 3.2.11)
61
65
  bundler (~> 1.0)
62
- railties (= 3.0.3)
63
- railties (3.0.3)
64
- actionpack (= 3.0.3)
65
- activesupport (= 3.0.3)
66
+ railties (= 3.2.11)
67
+ railties (3.2.11)
68
+ actionpack (= 3.2.11)
69
+ activesupport (= 3.2.11)
70
+ rack-ssl (~> 1.3.2)
66
71
  rake (>= 0.8.7)
67
- thor (~> 0.14.4)
68
- rake (0.8.7)
72
+ rdoc (~> 3.4)
73
+ thor (>= 0.14.6, < 2.0)
74
+ rake (10.0.3)
75
+ rdoc (3.12.1)
76
+ json (~> 1.4)
69
77
  rspec (2.0.0)
70
78
  rspec-core (= 2.0.0)
71
79
  rspec-expectations (= 2.0.0)
@@ -76,12 +84,18 @@ GEM
76
84
  rspec-mocks (2.0.0)
77
85
  rspec-core (= 2.0.0)
78
86
  rspec-expectations (= 2.0.0)
87
+ sprockets (2.2.2)
88
+ hike (~> 1.2)
89
+ multi_json (~> 1.0)
90
+ rack (~> 1.0)
91
+ tilt (~> 1.1, != 1.3.0)
79
92
  sqlite3-ruby (1.3.1)
80
- thor (0.14.6)
81
- treetop (1.4.10)
93
+ thor (0.17.0)
94
+ tilt (1.3.3)
95
+ treetop (1.4.12)
82
96
  polyglot
83
97
  polyglot (>= 0.3.1)
84
- tzinfo (0.3.33)
98
+ tzinfo (0.3.35)
85
99
 
86
100
  PLATFORMS
87
101
  ruby
data/README.rdoc CHANGED
@@ -11,13 +11,25 @@ This view helper acts as a replacement for error_messages_for by taking error me
11
11
  from your models and combing them with flash messages (multiple types such as error, confirm, etc.)
12
12
  and outputting them to your view. This gem comes with an example stylesheet and images.
13
13
 
14
- == Installation
15
14
 
16
- This gem is testing working with Rails 3.0 only!
15
+ == Installation: Rails 3.1+ Asset Pipeline (message_block v1)
17
16
 
18
17
  Include the gem using bundler in your Gemfile:
19
18
 
20
- gem "message_block"
19
+ gem "message_block", "~> 2.0"
20
+
21
+ Include the stylesheet in your application.css:
22
+
23
+ /*
24
+ *= require message_block
25
+ */
26
+
27
+
28
+ == Installation: Rails 3.0 Without Asset Pipeline (message_block v2)
29
+
30
+ Include the gem using bundler in your Gemfile:
31
+
32
+ gem "message_block", "~> 1.2"
21
33
 
22
34
  Then run the rake task to install the static files:
23
35
 
@@ -27,6 +39,7 @@ Then be sure to include the CSS definitions:
27
39
 
28
40
  <%= stylesheet_include_tag "message_block" %>
29
41
 
42
+
30
43
  == Usage
31
44
 
32
45
  Once you install this, you should now have a set of images at public/images/message_block and
@@ -0,0 +1,9 @@
1
+ module MessageBlock
2
+ class Engine < Rails::Engine
3
+ initializer "message_block.insert_helpers" do
4
+ ActiveSupport.on_load(:action_view) do
5
+ ActionView::Base.send(:include, MessageBlock::Helpers)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module MessageBlock
2
- VERSION = "1.1.0"
2
+ VERSION = "2.0.0"
3
3
  end
data/lib/message_block.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "rubygems"
2
+ require "rails"
2
3
  require "active_support"
3
4
  require "message_block/helpers"
4
- require "message_block/railtie"
5
+ require "message_block/engine"
data/spec/spec_helper.rb CHANGED
@@ -5,8 +5,6 @@ require "active_model"
5
5
  require "action_pack"
6
6
  require "action_view"
7
7
 
8
- require File.dirname(__FILE__) + '/../init'
9
-
10
8
  class Post
11
9
  extend ActiveModel::Naming
12
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: message_block
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 2.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-12 00:00:00.000000000 Z
12
+ date: 2013-02-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 3.0.0
21
+ version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: 3.0.0
29
+ version: 3.1.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rspec
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -67,27 +67,18 @@ executables: []
67
67
  extensions: []
68
68
  extra_rdoc_files: []
69
69
  files:
70
+ - lib/message_block/engine.rb
70
71
  - lib/message_block/helpers.rb
71
- - lib/message_block/railtie.rb
72
72
  - lib/message_block/version.rb
73
73
  - lib/message_block.rb
74
- - lib/tasks/message_block.rake
75
74
  - spec/message_block/helpers_spec.rb
76
75
  - spec/spec_helper.rb
77
- - assets/images/back.gif
78
- - assets/images/confirmation.gif
79
- - assets/images/error.gif
80
- - assets/images/info.gif
81
- - assets/images/notice.gif
82
- - assets/images/warn.gif
83
- - assets/stylesheets/message_block.css
84
- - rails/init.rb
76
+ - CHANGELOG
85
77
  - Gemfile
86
78
  - Gemfile.lock
87
79
  - LICENSE
88
80
  - Rakefile
89
81
  - README.rdoc
90
- - init.rb
91
82
  homepage: http://github.com/rubiety/message_block
92
83
  licenses: []
93
84
  post_install_message:
@@ -111,5 +102,6 @@ rubyforge_project: message_block
111
102
  rubygems_version: 1.8.22
112
103
  signing_key:
113
104
  specification_version: 3
114
- summary: Flash message and error_messages_for handling with a common interface.
105
+ summary: Flash message and error_messages_for handling with a common interface via
106
+ the asset pipeline
115
107
  test_files: []
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,34 +0,0 @@
1
- .message_block {
2
- clear: both;
3
- margin: 12px 0;
4
- }
5
-
6
- .message_block ul {
7
- border-bottom: 1px solid #ecd757;
8
- border-top: 1px solid #ecd757;
9
- list-style: none;
10
- padding: 10px;
11
- }
12
- .message_block ul li {
13
- margin-left: 3em;
14
- }
15
-
16
- .message_block ul.error {
17
- background: #fcf6d0 url(../../images/message_block/error.gif) 16px 50% no-repeat;
18
- }
19
-
20
- .message_block ul.info {
21
- background: #fcf6d0 url(../../images/message_block/info.gif) 16px 50% no-repeat;
22
- }
23
-
24
- .message_block ul.notice {
25
- background: #fcf6d0 url(../../images/message_block/notice.gif) 16px 50% no-repeat;
26
- }
27
-
28
- .message_block ul.confirm {
29
- background: #fcf6d0 url(../../images/message_block/confirmation.gif) 16px 50% no-repeat;
30
- }
31
-
32
- .message_block ul.warn {
33
- background: #fcf6d0 url(../../images/message_block/warn.gif) 1em 50% no-repeat;
34
- }
data/init.rb DELETED
@@ -1,3 +0,0 @@
1
- require "message_block"
2
-
3
- MessageBlock::Railtie.insert
@@ -1,21 +0,0 @@
1
- module MessageBlock
2
- if defined?(Rails::Railtie)
3
- class Railtie < Rails::Railtie
4
- initializer "message_block.insert_helpers" do
5
- ActiveSupport.on_load(:action_view) do
6
- MessageBlock::Railtie.insert
7
- end
8
- end
9
-
10
- rake_tasks do
11
- load "tasks/message_block.rake"
12
- end
13
- end
14
- end
15
-
16
- class Railtie
17
- def self.insert
18
- ActionView::Base.send(:include, MessageBlock::Helpers)
19
- end
20
- end
21
- end
@@ -1,27 +0,0 @@
1
- namespace :message_block do
2
- desc "Installs static files for the message_block gem"
3
- task :install do
4
- puts "Copying assets..."
5
-
6
- images_source = File.join(File.dirname(__FILE__), "..", "..", "assets", "images")
7
- stylesheets_source = File.join(File.dirname(__FILE__), "..", "..", "assets", "stylesheets", "message_block.css")
8
-
9
- images_target = Rails.root.join("public", "images", "message_block")
10
- stylesheets_target = Rails.root.join("public", "stylesheets", "message_block.css")
11
-
12
- unless File.exists?(images_target)
13
- FileUtils.cp_r(images_source, images_target)
14
- puts " Copied Images"
15
- else
16
- puts " Images appear to already be installed, not copying."
17
- end
18
-
19
- unless File.exists?(stylesheets_target)
20
- FileUtils.cp(stylesheets_source, stylesheets_target)
21
- puts " Copied Stylesheet"
22
- else
23
- puts " Stylesheet appears to already be installed, not copying"
24
- end
25
-
26
- end
27
- end
data/rails/init.rb DELETED
@@ -1,3 +0,0 @@
1
- require "message_block"
2
-
3
- MessageBlock::Railtie.insert