message_block 1.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +7 -1
- data/Gemfile +4 -0
- data/Gemfile.lock +125 -0
- data/README.rdoc +12 -7
- data/Rakefile +0 -9
- data/init.rb +3 -1
- data/lib/message_block/version.rb +3 -0
- data/spec/spec_helper.rb +2 -6
- metadata +65 -15
- data/spec/spec.opts +0 -5
data/CHANGELOG.rdoc
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
-
== [2010-10-13] 1.0
|
1
|
+
== [2010-10-13] 1.0.1 Removed Rails 2.3 Compatibility, Cucumber Overhaul
|
2
|
+
|
3
|
+
* Issues with loading rake tasks in Rails 2.3; removing compatibility
|
4
|
+
* Revamped Cucumber invocation to use Rails 3 with 'gem "message_block", :path => "..."'
|
5
|
+
* Upgraded RSpec to 2.0
|
6
|
+
|
7
|
+
== [2010-10-13] 1.0.0 Major Updates
|
2
8
|
|
3
9
|
* Finally updated to be a Gem
|
4
10
|
* Internal refactoring
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
message_block (1.0.1)
|
5
|
+
rails (>= 3.0.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
abstract (1.0.0)
|
11
|
+
actionmailer (3.0.0)
|
12
|
+
actionpack (= 3.0.0)
|
13
|
+
mail (~> 2.2.5)
|
14
|
+
actionpack (3.0.0)
|
15
|
+
activemodel (= 3.0.0)
|
16
|
+
activesupport (= 3.0.0)
|
17
|
+
builder (~> 2.1.2)
|
18
|
+
erubis (~> 2.6.6)
|
19
|
+
i18n (~> 0.4.1)
|
20
|
+
rack (~> 1.2.1)
|
21
|
+
rack-mount (~> 0.6.12)
|
22
|
+
rack-test (~> 0.5.4)
|
23
|
+
tzinfo (~> 0.3.23)
|
24
|
+
activemodel (3.0.0)
|
25
|
+
activesupport (= 3.0.0)
|
26
|
+
builder (~> 2.1.2)
|
27
|
+
i18n (~> 0.4.1)
|
28
|
+
activerecord (3.0.0)
|
29
|
+
activemodel (= 3.0.0)
|
30
|
+
activesupport (= 3.0.0)
|
31
|
+
arel (~> 1.0.0)
|
32
|
+
tzinfo (~> 0.3.23)
|
33
|
+
activeresource (3.0.0)
|
34
|
+
activemodel (= 3.0.0)
|
35
|
+
activesupport (= 3.0.0)
|
36
|
+
activesupport (3.0.0)
|
37
|
+
arel (1.0.1)
|
38
|
+
activesupport (~> 3.0.0)
|
39
|
+
builder (2.1.2)
|
40
|
+
capybara (0.3.9)
|
41
|
+
culerity (>= 0.2.4)
|
42
|
+
mime-types (>= 1.16)
|
43
|
+
nokogiri (>= 1.3.3)
|
44
|
+
rack (>= 1.0.0)
|
45
|
+
rack-test (>= 0.5.4)
|
46
|
+
selenium-webdriver (>= 0.0.3)
|
47
|
+
childprocess (0.0.7)
|
48
|
+
ffi (~> 0.6.3)
|
49
|
+
cucumber (0.9.2)
|
50
|
+
builder (~> 2.1.2)
|
51
|
+
diff-lcs (~> 1.1.2)
|
52
|
+
gherkin (~> 2.2.5)
|
53
|
+
json (~> 1.4.6)
|
54
|
+
term-ansicolor (~> 1.0.5)
|
55
|
+
culerity (0.2.12)
|
56
|
+
diff-lcs (1.1.2)
|
57
|
+
erubis (2.6.6)
|
58
|
+
abstract (>= 1.0.0)
|
59
|
+
ffi (0.6.3)
|
60
|
+
rake (>= 0.8.7)
|
61
|
+
gherkin (2.2.8)
|
62
|
+
json (~> 1.4.6)
|
63
|
+
term-ansicolor (~> 1.0.5)
|
64
|
+
i18n (0.4.1)
|
65
|
+
json (1.4.6)
|
66
|
+
json_pure (1.4.6)
|
67
|
+
mail (2.2.7)
|
68
|
+
activesupport (>= 2.3.6)
|
69
|
+
mime-types
|
70
|
+
treetop (>= 1.4.5)
|
71
|
+
mime-types (1.16)
|
72
|
+
nokogiri (1.4.3.1)
|
73
|
+
polyglot (0.3.1)
|
74
|
+
rack (1.2.1)
|
75
|
+
rack-mount (0.6.13)
|
76
|
+
rack (>= 1.0.0)
|
77
|
+
rack-test (0.5.6)
|
78
|
+
rack (>= 1.0)
|
79
|
+
rails (3.0.0)
|
80
|
+
actionmailer (= 3.0.0)
|
81
|
+
actionpack (= 3.0.0)
|
82
|
+
activerecord (= 3.0.0)
|
83
|
+
activeresource (= 3.0.0)
|
84
|
+
activesupport (= 3.0.0)
|
85
|
+
bundler (~> 1.0.0)
|
86
|
+
railties (= 3.0.0)
|
87
|
+
railties (3.0.0)
|
88
|
+
actionpack (= 3.0.0)
|
89
|
+
activesupport (= 3.0.0)
|
90
|
+
rake (>= 0.8.4)
|
91
|
+
thor (~> 0.14.0)
|
92
|
+
rake (0.8.7)
|
93
|
+
rspec (2.0.0)
|
94
|
+
rspec-core (= 2.0.0)
|
95
|
+
rspec-expectations (= 2.0.0)
|
96
|
+
rspec-mocks (= 2.0.0)
|
97
|
+
rspec-core (2.0.0)
|
98
|
+
rspec-expectations (2.0.0)
|
99
|
+
diff-lcs (>= 1.1.2)
|
100
|
+
rspec-mocks (2.0.0)
|
101
|
+
rspec-core (= 2.0.0)
|
102
|
+
rspec-expectations (= 2.0.0)
|
103
|
+
rubyzip (0.9.4)
|
104
|
+
selenium-webdriver (0.0.29)
|
105
|
+
childprocess (>= 0.0.7)
|
106
|
+
ffi (~> 0.6.3)
|
107
|
+
json_pure
|
108
|
+
rubyzip
|
109
|
+
sqlite3-ruby (1.3.1)
|
110
|
+
term-ansicolor (1.0.5)
|
111
|
+
thor (0.14.3)
|
112
|
+
treetop (1.4.8)
|
113
|
+
polyglot (>= 0.3.1)
|
114
|
+
tzinfo (0.3.23)
|
115
|
+
|
116
|
+
PLATFORMS
|
117
|
+
ruby
|
118
|
+
|
119
|
+
DEPENDENCIES
|
120
|
+
capybara (~> 0.3.9)
|
121
|
+
cucumber (~> 0.9.2)
|
122
|
+
message_block!
|
123
|
+
rails (>= 3.0.0)
|
124
|
+
rspec (~> 2.0)
|
125
|
+
sqlite3-ruby (~> 1.3.1)
|
data/README.rdoc
CHANGED
@@ -7,24 +7,29 @@ indicating what type of message it is (error, confirmation, warning, etc.)
|
|
7
7
|
|
8
8
|
This view helper acts as a replacement for error_messages_for by taking error messages
|
9
9
|
from your models and combing them with flash messages (multiple types such as error, confirm, etc.)
|
10
|
-
and outputting them to your view. This
|
10
|
+
and outputting them to your view. This gem comes with an example stylesheet and images.
|
11
11
|
|
12
12
|
== Installation
|
13
13
|
|
14
|
+
This gem is testing working with Rails 3.0 only!
|
15
|
+
|
14
16
|
Include the gem using bundler in your Gemfile:
|
15
17
|
|
16
18
|
gem "message_block"
|
17
19
|
|
18
20
|
Then run the rake task to install the static files:
|
19
|
-
|
21
|
+
|
20
22
|
rake message_block:install
|
21
23
|
|
24
|
+
Then be sure to include the CSS definitions:
|
25
|
+
|
26
|
+
<%= stylesheet_include_tag "message_block" %>
|
27
|
+
|
22
28
|
== Usage
|
23
29
|
|
24
30
|
Once you install this, you should now have a set of images at public/images/message_block and
|
25
|
-
a basic stylesheet installed at public/stylesheets/message_block.css.
|
26
|
-
|
27
|
-
the helper <tt><%= message_block %></tt> as described below:
|
31
|
+
a basic stylesheet installed at public/stylesheets/message_block.css. Then you can use
|
32
|
+
the helper <tt><%= message_block %></tt>:
|
28
33
|
|
29
34
|
The first argument specifies a hash options:
|
30
35
|
|
@@ -75,9 +80,9 @@ Sometimes you'll want to use the message block pattern within JavaScript. Would
|
|
75
80
|
the message_block DOM tree based on a JavaScript object not unlike Rails flash?
|
76
81
|
|
77
82
|
Included in the plugin is a Prototype JS implementation to make this easier. Note that this file is *not* automatically
|
78
|
-
copied when the plugin is installed. Currently only
|
83
|
+
copied when the plugin is installed. Currently this only works with prototype, but will be converted to jQuery before long:
|
79
84
|
|
80
|
-
assets/javascripts/
|
85
|
+
assets/javascripts/message_block.js
|
81
86
|
|
82
87
|
Example Usage:
|
83
88
|
|
data/Rakefile
CHANGED
@@ -1,15 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
3
|
require 'rake/rdoctask'
|
4
|
-
require 'spec/rake/spectask'
|
5
|
-
|
6
|
-
desc "Run specs"
|
7
|
-
Spec::Rake::SpecTask.new do |t|
|
8
|
-
t.spec_files = Rake::FileList["spec/**/*_spec.rb"]
|
9
|
-
t.spec_opts = ["-c"]
|
10
|
-
end
|
11
|
-
|
12
|
-
task :default => :spec
|
13
4
|
|
14
5
|
desc "Generate documentation for the plugin."
|
15
6
|
Rake::RDocTask.new(:rdoc) do |rdoc|
|
data/init.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,15 +1,11 @@
|
|
1
1
|
require "rubygems"
|
2
|
-
require "
|
2
|
+
require "message_block"
|
3
3
|
require "active_support"
|
4
|
+
require "action_pack"
|
4
5
|
require "action_view"
|
5
|
-
require "message_block"
|
6
6
|
|
7
7
|
require File.dirname(__FILE__) + '/../init'
|
8
8
|
|
9
|
-
Spec::Runner.configure do |config|
|
10
|
-
config.mock_with :mocha
|
11
|
-
end
|
12
|
-
|
13
9
|
# Borrowed model stubs from Rails active_record_helper_test.rb
|
14
10
|
# TODO: Re-implement using mocha
|
15
11
|
Post = Struct.new("Post", :title, :author_name)
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: message_block
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Ben Hughes
|
@@ -18,37 +19,84 @@ date: 2010-10-14 00:00:00 +08:00
|
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
|
-
name:
|
22
|
+
name: rails
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
25
|
none: false
|
25
26
|
requirements:
|
26
27
|
- - ">="
|
27
28
|
- !ruby/object:Gem::Version
|
28
|
-
hash:
|
29
|
+
hash: 7
|
29
30
|
segments:
|
30
|
-
-
|
31
|
-
-
|
32
|
-
-
|
33
|
-
version:
|
31
|
+
- 3
|
32
|
+
- 0
|
33
|
+
- 0
|
34
|
+
version: 3.0.0
|
34
35
|
type: :runtime
|
35
36
|
version_requirements: *id001
|
36
37
|
- !ruby/object:Gem::Dependency
|
37
|
-
name:
|
38
|
+
name: rspec
|
38
39
|
prerelease: false
|
39
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
41
|
none: false
|
41
42
|
requirements:
|
42
|
-
- -
|
43
|
+
- - ~>
|
43
44
|
- !ruby/object:Gem::Version
|
44
|
-
hash:
|
45
|
+
hash: 3
|
45
46
|
segments:
|
46
47
|
- 2
|
48
|
+
- 0
|
49
|
+
version: "2.0"
|
50
|
+
type: :development
|
51
|
+
version_requirements: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
name: cucumber
|
54
|
+
prerelease: false
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ~>
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 63
|
61
|
+
segments:
|
62
|
+
- 0
|
63
|
+
- 9
|
47
64
|
- 2
|
65
|
+
version: 0.9.2
|
66
|
+
type: :development
|
67
|
+
version_requirements: *id003
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: capybara
|
70
|
+
prerelease: false
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 1
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
- 3
|
80
|
+
- 9
|
81
|
+
version: 0.3.9
|
82
|
+
type: :development
|
83
|
+
version_requirements: *id004
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: sqlite3-ruby
|
86
|
+
prerelease: false
|
87
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
88
|
+
none: false
|
89
|
+
requirements:
|
90
|
+
- - ~>
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
hash: 25
|
93
|
+
segments:
|
48
94
|
- 1
|
49
|
-
|
50
|
-
|
51
|
-
|
95
|
+
- 3
|
96
|
+
- 1
|
97
|
+
version: 1.3.1
|
98
|
+
type: :development
|
99
|
+
version_requirements: *id005
|
52
100
|
description: Implements the common view pattern by which a list of messages are shown at the top, often a combination of flash messages and ActiveRecord validation issues on one or more models.
|
53
101
|
email: ben@railsgarden.com
|
54
102
|
executables: []
|
@@ -60,12 +108,14 @@ extra_rdoc_files: []
|
|
60
108
|
files:
|
61
109
|
- lib/message_block/helpers.rb
|
62
110
|
- lib/message_block/railtie.rb
|
111
|
+
- lib/message_block/version.rb
|
63
112
|
- lib/message_block.rb
|
64
113
|
- lib/tasks/message_block.rake
|
65
114
|
- spec/message_block/helpers_spec.rb
|
66
|
-
- spec/spec.opts
|
67
115
|
- spec/spec_helper.rb
|
68
116
|
- CHANGELOG.rdoc
|
117
|
+
- Gemfile
|
118
|
+
- Gemfile.lock
|
69
119
|
- LICENSE
|
70
120
|
- Rakefile
|
71
121
|
- README.rdoc
|