activo-rails 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.
@@ -1,50 +1,48 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- activo-rails (0.0.1)
4
+ activo-rails (1.0.1)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
8
8
  specs:
9
9
  abstract (1.0.0)
10
- actionpack (3.0.1)
11
- activemodel (= 3.0.1)
12
- activesupport (= 3.0.1)
10
+ actionpack (3.0.3)
11
+ activemodel (= 3.0.3)
12
+ activesupport (= 3.0.3)
13
13
  builder (~> 2.1.2)
14
14
  erubis (~> 2.6.6)
15
- i18n (~> 0.4.1)
15
+ i18n (~> 0.4)
16
16
  rack (~> 1.2.1)
17
- rack-mount (~> 0.6.12)
18
- rack-test (~> 0.5.4)
17
+ rack-mount (~> 0.6.13)
18
+ rack-test (~> 0.5.6)
19
19
  tzinfo (~> 0.3.23)
20
- activemodel (3.0.1)
21
- activesupport (= 3.0.1)
20
+ activemodel (3.0.3)
21
+ activesupport (= 3.0.3)
22
22
  builder (~> 2.1.2)
23
- i18n (~> 0.4.1)
24
- activesupport (3.0.1)
23
+ i18n (~> 0.4)
24
+ activesupport (3.0.3)
25
25
  builder (2.1.2)
26
26
  diff-lcs (1.1.2)
27
27
  erubis (2.6.6)
28
28
  abstract (>= 1.0.0)
29
- i18n (0.4.2)
30
- nokogiri (1.4.3.1)
29
+ i18n (0.5.0)
30
+ nokogiri (1.4.4)
31
31
  rack (1.2.1)
32
32
  rack-mount (0.6.13)
33
33
  rack (>= 1.0.0)
34
- rack-test (0.5.6)
34
+ rack-test (0.5.7)
35
35
  rack (>= 1.0)
36
36
  rake (0.8.7)
37
- rspec (2.0.1)
38
- rspec-core (~> 2.0.1)
39
- rspec-expectations (~> 2.0.1)
40
- rspec-mocks (~> 2.0.1)
41
- rspec-core (2.0.1)
42
- rspec-expectations (2.0.1)
43
- diff-lcs (>= 1.1.2)
44
- rspec-mocks (2.0.1)
45
- rspec-core (~> 2.0.1)
46
- rspec-expectations (~> 2.0.1)
47
- tzinfo (0.3.23)
37
+ rspec (2.5.0)
38
+ rspec-core (~> 2.5.0)
39
+ rspec-expectations (~> 2.5.0)
40
+ rspec-mocks (~> 2.5.0)
41
+ rspec-core (2.5.1)
42
+ rspec-expectations (2.5.0)
43
+ diff-lcs (~> 1.1.2)
44
+ rspec-mocks (2.5.0)
45
+ tzinfo (0.3.24)
48
46
 
49
47
  PLATFORMS
50
48
  ruby
data/README.md CHANGED
@@ -223,6 +223,16 @@ send me a pull request when your feature is ready.
223
223
  For the original (and beautiful) Activo web app theme: David Francisco (http://github.com/dmfrancisco/activo)
224
224
  Icons: FatCow (http://www.fatcow.com/free-icons)
225
225
  Fixing jQuery UI image paths: Mike Park (http://github.com/mikepinde/)
226
+ Fixing link options, and breadcrumbs: Nirmit Patel (http://github.com/NeMO84/)
226
227
 
227
228
  And thanks to the people brave enough to use this before it was released, or even had a readme, for provoking me into
228
229
  actually releasing the damn thing.
230
+
231
+ ## License ##
232
+
233
+ All original components of activo-rails are licensed under the MIT license:
234
+
235
+ Copyright (c) 2011, Jon Wood
236
+
237
+ That doesn't cover the Activo theme itself, the FatCow icon set, or jQuery, which remain under their original licenses
238
+ and the property of their original authors.
@@ -149,7 +149,7 @@ module ActivoRails
149
149
  link_to(item[:label], item[:href])
150
150
  end
151
151
  end
152
- }.join("")
152
+ }.join("").html_safe
153
153
  end
154
154
  end
155
155
  end
@@ -172,9 +172,9 @@ module ActivoRails
172
172
  options[:class] << " first" if item_list.empty?
173
173
  options[:class] << " active" if options[:active]
174
174
 
175
- options[:link_options] = {}
176
- options[:link_options][:method] = options[:method] if options[:method]
177
-
175
+ options[:link_options] ||= {}
176
+ options[:link_options].merge!(:method => options[:method]) if options[:method]
177
+
178
178
  item_list << {
179
179
  :label => label,
180
180
  :href => path,
@@ -1,3 +1,3 @@
1
1
  module ActivoRails
2
- VERSION = "1.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require File.expand_path("../spec_helper", __FILE__)
2
+ require 'activo-rails/helper'
2
3
 
3
4
  describe ActivoRails::Helper::NavigationBuilder do
4
5
  let(:builder) { ActivoRails::Helper::NavigationBuilder.new }
@@ -46,6 +47,21 @@ describe ActivoRails::Helper::NavigationBuilder do
46
47
  builder.item("New Item", "", :method => :delete)
47
48
  builder.item_list[0][:link_options].should eq({ :method => :delete })
48
49
  end
50
+
51
+ it "sets the method on link_options as it was provided (preserves it)" do
52
+ builder.item("Delete", "", :link_options => {:method => :delete})
53
+ builder.item_list[0][:link_options].should eq({ :method => :delete })
54
+ end
55
+
56
+ it "sets the method on link_options as provided through link_options and method optiosn, giving priority to the method option" do
57
+ builder.item("Should Post", "", :link_options => {:method => :delete}, :method => :post)
58
+ builder.item_list[0][:link_options].should eq({ :method => :post })
59
+ end
60
+
61
+ it "sets the method on link_options if provided as " do
62
+ builder.item("New Item", "", :method => :delete)
63
+ builder.item_list[0][:link_options].should eq({ :method => :delete })
64
+ end
49
65
 
50
66
  it "sets the icon if provided" do
51
67
  builder.item("New Item", "", :icon => "new")
@@ -71,6 +87,7 @@ describe ActivoRails::Helper::NavigationBuilder do
71
87
  builder.item("Delete", "")
72
88
  builder.item_list[0][:active].should be_false
73
89
  end
90
+
74
91
  end
75
92
 
76
93
  it { should respond_to(:item_list) }
metadata CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- version: "1.0"
8
+ - 1
9
+ version: 1.0.1
9
10
  platform: ruby
10
11
  authors:
11
12
  - Jon Wood
@@ -13,7 +14,7 @@ autorequire:
13
14
  bindir: bin
14
15
  cert_chain: []
15
16
 
16
- date: 2011-01-03 00:00:00 +00:00
17
+ date: 2011-02-08 00:00:00 +00:00
17
18
  default_executable:
18
19
  dependencies:
19
20
  - !ruby/object:Gem::Dependency