helpful_fields 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +1 -1
- data/Rakefile +9 -1
- data/Readme.md +2 -1
- data/VERSION +1 -1
- data/helpful_fields.gemspec +4 -2
- data/init.rb +1 -0
- data/spec/helpful_fields_spec.rb +9 -1
- data/spec/spec_helper.rb +1 -0
- metadata +7 -6
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -1,5 +1,12 @@
|
|
1
|
+
task :spec do
|
2
|
+
sh "rspec spec"
|
3
|
+
end
|
4
|
+
|
1
5
|
task :default do
|
2
|
-
sh "
|
6
|
+
sh "RAILS=2.3.12 && (bundle || bundle install) && bundle exec rake spec"
|
7
|
+
sh "RAILS=3.0.9 && (bundle || bundle install) && exec rake spec"
|
8
|
+
sh "RAILS=3.1.0.rc4 && (bundle || bundle install) && exec rake spec"
|
9
|
+
sh "git checkout Gemfile.lock"
|
3
10
|
end
|
4
11
|
|
5
12
|
begin
|
@@ -10,6 +17,7 @@ begin
|
|
10
17
|
gem.email = "michael@grosser.it"
|
11
18
|
gem.homepage = "http://github.com/grosser/#{gem.name}"
|
12
19
|
gem.authors = ["Michael Grosser"]
|
20
|
+
gem.license = 'MIT'
|
13
21
|
end
|
14
22
|
|
15
23
|
Jeweler::GemcutterTasks.new
|
data/Readme.md
CHANGED
@@ -40,4 +40,5 @@ Author
|
|
40
40
|
======
|
41
41
|
[Michael Grosser](http://grosser.it)<br/>
|
42
42
|
michael@grosser.it<br/>
|
43
|
-
|
43
|
+
License: MIT<br/>
|
44
|
+
[![Build Status](https://secure.travis-ci.org/grosser/helpful_fields.png)](http://travis-ci.org/grosser/helpful_fields)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/helpful_fields.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{helpful_fields}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Grosser"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-11-06}
|
13
13
|
s.email = %q{michael@grosser.it}
|
14
14
|
s.files = [
|
15
15
|
"Gemfile",
|
@@ -18,12 +18,14 @@ Gem::Specification.new do |s|
|
|
18
18
|
"Readme.md",
|
19
19
|
"VERSION",
|
20
20
|
"helpful_fields.gemspec",
|
21
|
+
"init.rb",
|
21
22
|
"lib/helpful_fields.rb",
|
22
23
|
"lib/helpful_fields/core_ext/hash.rb",
|
23
24
|
"spec/helpful_fields_spec.rb",
|
24
25
|
"spec/spec_helper.rb"
|
25
26
|
]
|
26
27
|
s.homepage = %q{http://github.com/grosser/helpful_fields}
|
28
|
+
s.licenses = ["MIT"]
|
27
29
|
s.require_paths = ["lib"]
|
28
30
|
s.rubygems_version = %q{1.6.2}
|
29
31
|
s.summary = %q{Many helpful field helpers e.g. check_box_with_label}
|
data/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'helpful_fields'
|
data/spec/helpful_fields_spec.rb
CHANGED
@@ -2,10 +2,18 @@ require File.expand_path('spec/spec_helper')
|
|
2
2
|
|
3
3
|
describe HelpfulFields do
|
4
4
|
def render(text, params={})
|
5
|
+
if ActionPack::VERSION::MAJOR > 2
|
6
|
+
text = text.gsub('<% form_for :user, nil,', '<%= form_for @user, :as => :user,')
|
7
|
+
end
|
8
|
+
|
5
9
|
view = ActionView::Base.new
|
6
10
|
view.stub!(:params).and_return params.with_indifferent_access
|
7
11
|
view.stub!(:protect_against_forgery?).and_return false
|
8
|
-
view.render(:inline => text)
|
12
|
+
result = view.render(:inline => text)
|
13
|
+
result = result.gsub("accept-charset=\"UTF-8\" ","")
|
14
|
+
result = result.gsub(%r{<div .*?</div>},"")
|
15
|
+
result = result.gsub('class="user_new" id="user_new" ',"")
|
16
|
+
result
|
9
17
|
end
|
10
18
|
|
11
19
|
it "has a VERSION" do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: helpful_fields
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Grosser
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-11-06 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -34,14 +34,15 @@ files:
|
|
34
34
|
- Readme.md
|
35
35
|
- VERSION
|
36
36
|
- helpful_fields.gemspec
|
37
|
+
- init.rb
|
37
38
|
- lib/helpful_fields.rb
|
38
39
|
- lib/helpful_fields/core_ext/hash.rb
|
39
40
|
- spec/helpful_fields_spec.rb
|
40
41
|
- spec/spec_helper.rb
|
41
42
|
has_rdoc: true
|
42
43
|
homepage: http://github.com/grosser/helpful_fields
|
43
|
-
licenses:
|
44
|
-
|
44
|
+
licenses:
|
45
|
+
- MIT
|
45
46
|
post_install_message:
|
46
47
|
rdoc_options: []
|
47
48
|
|