viewaide 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -18,3 +18,11 @@ begin
18
18
  rescue LoadError
19
19
  puts "Jeweler not available. Install it with: gem install jeweler"
20
20
  end
21
+
22
+ Rake::TestTask.new do |t|
23
+ t.libs << "test"
24
+ t.test_files = FileList["test/*_test.rb"]
25
+ t.verbose = true
26
+ end
27
+
28
+ task :default => [:test]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -40,7 +40,7 @@ module Viewaide
40
40
  @@column_prefix = "span"
41
41
  end
42
42
 
43
- easel_grid!
43
+ blueprint_grid!
44
44
 
45
45
  def last_column
46
46
  @@last_column
@@ -60,19 +60,19 @@ class FormHelperTest < Viewaide::ViewTestCase
60
60
 
61
61
  should "assign default class if width class is passed as the only class" do
62
62
  show_view "<% set :half do %>words<% end %>" do
63
- assert_select "div.text.col-12", "words"
63
+ assert_select "div.text.span-12", "words"
64
64
  end
65
65
  end
66
66
 
67
67
  should "assign default class if last class is passed as the only class" do
68
68
  show_view "<% set :half, :last do %>words<% end %>" do
69
- assert_select "div.col-12.text.col-last", "words"
69
+ assert_select "div.span-12.text.last", "words"
70
70
  end
71
71
  end
72
72
 
73
73
  should "assign default class if error class is passed" do
74
74
  show_view "<% set :half, :last, :error do %>words<% end %>" do
75
- assert_select "div.col-12.text.col-last.error", "words"
75
+ assert_select "div.span-12.text.last.error", "words"
76
76
  end
77
77
  end
78
78
 
@@ -101,14 +101,14 @@ class FormHelperTest < Viewaide::ViewTestCase
101
101
  end
102
102
 
103
103
  should "allow adding fieldset classes" do
104
- show_view "<% fieldset :hform, 'col-last' do %>words<% end %>" do
105
- assert_select "fieldset.hform.col-last", "words"
104
+ show_view "<% fieldset :hform, :last do %>words<% end %>" do
105
+ assert_select "fieldset.hform.last", "words"
106
106
  end
107
107
  end
108
108
 
109
109
  should "allow adding fieldset classes and a legend" do
110
- show_view "<% fieldset 'User Information', :hform, 'col-last' do %>words<% end %>" do
111
- assert_select "fieldset.hform.col-last", /words/ do
110
+ show_view "<% fieldset 'User Information', :hform, :last do %>words<% end %>" do
111
+ assert_select "fieldset.hform.last", /words/ do
112
112
  assert_select "h3.legend", "User Information"
113
113
  end
114
114
  end
@@ -29,16 +29,16 @@ class GridHelperTest < Viewaide::ViewTestCase
29
29
 
30
30
  show_view template do
31
31
  assert_select ".container", 1
32
- assert_select ".container.col-24", 0
33
- assert_select ".col-24", 1
34
- assert_select ".col-12", 2
35
- assert_select ".col-12#primary", 1
36
- assert_select ".col-12#secondary", 1
37
- assert_select ".col-4", 2
32
+ assert_select ".container.span-24", 0
33
+ assert_select ".span-24", 1
34
+ assert_select ".span-12", 2
35
+ assert_select ".span-12#primary", 1
36
+ assert_select ".span-12#secondary", 1
37
+ assert_select ".span-4", 2
38
38
  assert_select ".prepend-4", 1
39
- assert_select ".col-24.col-last", 0
40
- assert_select ".col-12.col-last", 1
41
- assert_select ".col-4.col-last", 1
39
+ assert_select ".span-24.last", 0
40
+ assert_select ".span-12.last", 1
41
+ assert_select ".span-4.last", 1
42
42
  assert_select "hr", 2
43
43
  end
44
44
  end
@@ -55,12 +55,12 @@ class GridHelperTest < Viewaide::ViewTestCase
55
55
  )
56
56
 
57
57
  show_view template do
58
- assert_select "div.col-24" do
59
- assert_select "fieldset.hform.col-12" do
60
- assert_select "div.col-4", "text"
61
- assert_select "div.col-8.col-last", "more text"
58
+ assert_select "div.span-24" do
59
+ assert_select "fieldset.hform.span-12" do
60
+ assert_select "div.span-4", "text"
61
+ assert_select "div.span-8.last", "more text"
62
62
  end
63
- assert_select "table.col-12.col-last", "table"
63
+ assert_select "table.span-12.last", "table"
64
64
  end
65
65
  end
66
66
  end
@@ -87,24 +87,24 @@ class GridHelperTest < Viewaide::ViewTestCase
87
87
  )
88
88
 
89
89
  show_view template do
90
- assert_select "fieldset.hform.col-12" do
91
- assert_select "div.col-4", "text"
92
- assert_select "div.col-8.col-last", "more text"
93
-
94
- assert_select "div.col-12.col-last" do
95
- assert_select "div.col-4", "one third"
96
- assert_select "div.col-8.col-last" do
97
- assert_select "div.col-4", "half"
98
- assert_select "div.col-4.col-last", "last half"
90
+ assert_select "fieldset.hform.span-12" do
91
+ assert_select "div.span-4", "text"
92
+ assert_select "div.span-8.last", "more text"
93
+
94
+ assert_select "div.span-12.last" do
95
+ assert_select "div.span-4", "one third"
96
+ assert_select "div.span-8.last" do
97
+ assert_select "div.span-4", "half"
98
+ assert_select "div.span-4.last", "last half"
99
99
  end
100
100
  end
101
101
  end
102
- assert_select "div.col-8" do
103
- assert_select "div.col-2", "two wide"
104
- assert_select "div.col-4", "four wide"
105
- assert_select "div.col-2.col-last", "two more wide"
102
+ assert_select "div.span-8" do
103
+ assert_select "div.span-2", "two wide"
104
+ assert_select "div.span-4", "four wide"
105
+ assert_select "div.span-2.last", "two more wide"
106
106
  end
107
- assert_select "table.col-4.col-last", "table"
107
+ assert_select "table.span-4.last", "table"
108
108
  end
109
109
  end
110
110
 
@@ -128,20 +128,20 @@ class GridHelperTest < Viewaide::ViewTestCase
128
128
  )
129
129
 
130
130
  show_view template do
131
- assert_select "div.container.col-24", 1
131
+ assert_select "div.container.span-24", 1
132
132
  assert_select "div.container" do
133
- assert_select "div.col-12" do
134
- assert_select "fieldset.hform.col-6" do
135
- assert_select "div.col-2", "text"
136
- assert_select "div.col-4.col-last", "more text"
133
+ assert_select "div.span-12" do
134
+ assert_select "fieldset.hform.span-6" do
135
+ assert_select "div.span-2", "text"
136
+ assert_select "div.span-4.last", "more text"
137
137
  end
138
- assert_select "table.col-6.col-last", "table"
138
+ assert_select "table.span-6.last", "table"
139
139
  end
140
140
 
141
- assert_select "div.col-8", "one third!"
141
+ assert_select "div.span-8", "one third!"
142
142
 
143
- assert_select "div.col-4.col-last" do
144
- assert_select "fieldset.vform.col-4.col-last" do
143
+ assert_select "div.span-4.last" do
144
+ assert_select "fieldset.vform.span-4.last" do
145
145
  assert_select "div", "text"
146
146
  end
147
147
  end
@@ -149,7 +149,7 @@ class GridHelperTest < Viewaide::ViewTestCase
149
149
  end
150
150
  end
151
151
 
152
- should "properly assign classes when using Blueprint grid" do
152
+ should "properly assign classes when using Easel grid" do
153
153
  template = %(
154
154
  <% container do %>
155
155
  <% column do %>
@@ -171,21 +171,21 @@ class GridHelperTest < Viewaide::ViewTestCase
171
171
  <% end %>
172
172
  <% end %>
173
173
  )
174
- Viewaide::Helpers::GridHelper.blueprint_grid!
174
+ Viewaide::Helpers::GridHelper.easel_grid!
175
175
  show_view template do
176
176
  assert_select ".container", 1
177
- assert_select ".span-24", 1
178
- assert_select ".span-12", 2
179
- assert_select ".span-12#primary", 1
180
- assert_select ".span-12#secondary", 1
181
- assert_select ".span-4", 2
177
+ assert_select ".col-24", 1
178
+ assert_select ".col-12", 2
179
+ assert_select ".col-12#primary", 1
180
+ assert_select ".col-12#secondary", 1
181
+ assert_select ".col-4", 2
182
182
  assert_select ".prepend-4", 1
183
- assert_select ".span-24.last", 0
184
- assert_select ".span-12.last", 1
185
- assert_select ".span-4.last", 1
183
+ assert_select ".col-24.col-last", 0
184
+ assert_select ".col-12.col-last", 1
185
+ assert_select ".col-4.col-last", 1
186
186
  assert_select "hr", 2
187
187
  end
188
- Viewaide::Helpers::GridHelper.easel_grid!
188
+ Viewaide::Helpers::GridHelper.blueprint_grid!
189
189
  end
190
190
  end
191
191
 
@@ -195,7 +195,7 @@ class GridHelperTest < Viewaide::ViewTestCase
195
195
  show_view %(
196
196
  <% column :id => "my-custom-id", :class => "content" do %>words<% end %>
197
197
  ) do
198
- assert_select "div.col-24.content#my-custom-id", "words"
198
+ assert_select "div.span-24.content#my-custom-id", "words"
199
199
  end
200
200
  end
201
201
 
@@ -208,18 +208,18 @@ class GridHelperTest < Viewaide::ViewTestCase
208
208
  <% column 1, :last do %>one<% end %>
209
209
  <% end %>
210
210
  ) do
211
- assert_select "div.col-6.sidebar" do
212
- assert_select "div.col-6.col-last#main", "main sidebar"
213
- assert_select "div.col-3", "three"
214
- assert_select "div.col-2", "two"
215
- assert_select "div.col-1.col-last", "one"
211
+ assert_select "div.span-6.sidebar" do
212
+ assert_select "div.span-6.last#main", "main sidebar"
213
+ assert_select "div.span-3", "three"
214
+ assert_select "div.span-2", "two"
215
+ assert_select "div.span-1.last", "one"
216
216
  end
217
217
  end
218
218
  end
219
219
 
220
220
  should "allow tag overriding" do
221
221
  show_view %(<% column :tag => :section do %>content<% end %>) do
222
- assert_select "section.col-24:not([tag=section])", "content"
222
+ assert_select "section.span-24:not([tag=section])", "content"
223
223
  end
224
224
  end
225
225
  end
data/viewaide.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{viewaide}
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joshua Clayton"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viewaide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Clayton