hashbrowns 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +2 -0
- data/VERSION +1 -1
- data/example/Gemfile.lock +1 -1
- data/hashbrowns.gemspec +11 -11
- data/lib/hashbrowns/configuration.rb +3 -2
- data/lib/hashbrowns/helpers/links_helpers.rb +1 -1
- data/lib/hashbrowns/helpers/overview_helpers.rb +1 -1
- metadata +219 -215
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
data/example/Gemfile.lock
CHANGED
data/hashbrowns.gemspec
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.1.
|
7
|
+
s.name = %q{hashbrowns}
|
8
|
+
s.version = "0.1.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
11
|
+
s.authors = [%q{crimsonknave}]
|
12
|
+
s.date = %q{2012-12-03}
|
13
|
+
s.description = %q{Provides a DSL and helpers to convert hashes into html tables. Allows you to create overviews with selected fields, define keys whose values link to a url and so on.}
|
14
|
+
s.email = %q{crimsonknave@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
17
|
"README.md",
|
@@ -149,11 +149,11 @@ Gem::Specification.new do |s|
|
|
149
149
|
"test/helper.rb",
|
150
150
|
"test/test_hash_tabler.rb"
|
151
151
|
]
|
152
|
-
s.homepage =
|
153
|
-
s.licenses = [
|
154
|
-
s.require_paths = [
|
155
|
-
s.rubygems_version =
|
156
|
-
s.summary =
|
152
|
+
s.homepage = %q{http://github.com/crimsonknave/hashbrowns}
|
153
|
+
s.licenses = [%q{MIT}]
|
154
|
+
s.require_paths = [%q{lib}]
|
155
|
+
s.rubygems_version = %q{1.8.9}
|
156
|
+
s.summary = %q{Cooks your hashes into html}
|
157
157
|
|
158
158
|
if s.respond_to? :specification_version then
|
159
159
|
s.specification_version = 3
|
@@ -53,12 +53,13 @@ module HashBrowns
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def add_important_name(name, value, status=false)
|
56
|
-
name
|
57
|
-
value = value.downcase if @ignore_important_case && value.kind_of?(String)
|
56
|
+
name = name.to_s
|
58
57
|
if value.kind_of?(Proc)
|
59
58
|
@important[name] = value
|
60
59
|
return
|
61
60
|
end
|
61
|
+
value, status = value.to_s, status.to_s
|
62
|
+
value = value.downcase if @ignore_important_case && value.kind_of?(String)
|
62
63
|
return false unless status
|
63
64
|
status = @status_hash[status] if @status_hash.has_key?(status)
|
64
65
|
|
@@ -4,7 +4,7 @@ module HashBrowns
|
|
4
4
|
return "" if value.nil? or key.nil?
|
5
5
|
key, value, parent, id, text = key.to_s, value.to_s, parent.to_s, id.to_s, text.to_s
|
6
6
|
text = value if text
|
7
|
-
puts "k #{key}, v #{value}, p #{parent} i #{id} t #{text}"
|
7
|
+
#puts "k #{key}, v #{value}, p #{parent} i #{id} t #{text}"
|
8
8
|
return link_to(text, HashBrowns.conf.link_parents[parent][key]+value).html_safe if parent && HashBrowns.conf.link_parents.has_key?(parent) && HashBrowns.conf.link_parents[parent].has_key?(key)
|
9
9
|
return link_to(text, HashBrowns.conf.link_hash[key]+value).html_safe if HashBrowns.conf.link_hash.has_key?(key)
|
10
10
|
return link_to(text, value).html_safe if HashBrowns.conf.links.include?(key)
|
metadata
CHANGED
@@ -1,235 +1,239 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: hashbrowns
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.5
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 0.1.6
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
- crimsonknave
|
7
|
+
authors:
|
8
|
+
- crimsonknave
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
you to create overviews with selected fields, define keys whose values link to a
|
71
|
-
url and so on.
|
12
|
+
|
13
|
+
date: 2012-12-03 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: haml-rails
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
type: :runtime
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: shoulda
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: "0"
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rdoc
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: "0"
|
46
|
+
type: :development
|
47
|
+
version_requirements: *id003
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: bundler
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: "0"
|
57
|
+
type: :development
|
58
|
+
version_requirements: *id004
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: jeweler
|
61
|
+
prerelease: false
|
62
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: "0"
|
68
|
+
type: :development
|
69
|
+
version_requirements: *id005
|
70
|
+
description: Provides a DSL and helpers to convert hashes into html tables. Allows you to create overviews with selected fields, define keys whose values link to a url and so on.
|
72
71
|
email: crimsonknave@gmail.com
|
73
72
|
executables: []
|
73
|
+
|
74
74
|
extensions: []
|
75
|
-
|
76
|
-
|
77
|
-
-
|
78
|
-
-
|
79
|
-
|
80
|
-
|
81
|
-
- .
|
82
|
-
-
|
83
|
-
- Gemfile
|
84
|
-
-
|
85
|
-
-
|
86
|
-
-
|
87
|
-
-
|
88
|
-
-
|
89
|
-
-
|
90
|
-
- example/.
|
91
|
-
- example
|
92
|
-
- example/Gemfile
|
93
|
-
- example/
|
94
|
-
- example/
|
95
|
-
- example/
|
96
|
-
- example/app/assets/
|
97
|
-
- example/app/assets/javascripts/
|
98
|
-
- example/app/assets/javascripts/
|
99
|
-
- example/app/assets/javascripts/
|
100
|
-
- example/app/assets/
|
101
|
-
- example/app/assets/stylesheets/
|
102
|
-
- example/app/assets/stylesheets/
|
103
|
-
- example/app/assets/stylesheets/
|
104
|
-
- example/app/assets/stylesheets/
|
105
|
-
- example/app/assets/stylesheets/
|
106
|
-
- example/app/
|
107
|
-
- example/app/controllers/
|
108
|
-
- example/app/controllers/
|
109
|
-
- example/app/controllers/
|
110
|
-
- example/app/
|
111
|
-
- example/app/helpers/
|
112
|
-
- example/app/helpers/
|
113
|
-
- example/app/helpers/
|
114
|
-
- example/app/
|
115
|
-
- example/app/
|
116
|
-
- example/app/models
|
117
|
-
- example/app/models/
|
118
|
-
- example/app/models/
|
119
|
-
- example/app/
|
120
|
-
- example/app/views/customers/
|
121
|
-
- example/app/views/customers/
|
122
|
-
- example/app/views/customers/
|
123
|
-
- example/app/views/customers/index.
|
124
|
-
- example/app/views/customers/
|
125
|
-
- example/app/views/customers/
|
126
|
-
- example/app/views/customers/show.
|
127
|
-
- example/app/views/
|
128
|
-
- example/app/views/destinations/
|
129
|
-
- example/app/views/destinations/
|
130
|
-
- example/app/views/destinations/
|
131
|
-
- example/app/views/destinations/index.
|
132
|
-
- example/app/views/destinations/
|
133
|
-
- example/app/views/destinations/
|
134
|
-
- example/app/views/destinations/show.
|
135
|
-
- example/app/views/
|
136
|
-
- example/app/views/
|
137
|
-
- example/app/views/orders/
|
138
|
-
- example/app/views/orders/
|
139
|
-
- example/app/views/orders/
|
140
|
-
- example/app/views/orders/index.
|
141
|
-
- example/app/views/orders/
|
142
|
-
- example/app/views/orders/
|
143
|
-
- example/app/views/orders/show.
|
144
|
-
- example/
|
145
|
-
- example/config
|
146
|
-
- example/config/
|
147
|
-
- example/config/
|
148
|
-
- example/config/
|
149
|
-
- example/config/
|
150
|
-
- example/config/environments/
|
151
|
-
- example/config/environments/
|
152
|
-
- example/config/
|
153
|
-
- example/config/initializers/
|
154
|
-
- example/config/initializers/
|
155
|
-
- example/config/initializers/
|
156
|
-
- example/config/initializers/
|
157
|
-
- example/config/initializers/
|
158
|
-
- example/config/initializers/
|
159
|
-
- example/config/
|
160
|
-
- example/config/
|
161
|
-
- example/
|
162
|
-
- example/db/migrate/
|
163
|
-
- example/db/migrate/
|
164
|
-
- example/db/
|
165
|
-
- example/db/
|
166
|
-
- example/
|
167
|
-
- example/lib/
|
168
|
-
- example/
|
169
|
-
- example/
|
170
|
-
- example/public/
|
171
|
-
- example/public/
|
172
|
-
- example/public/
|
173
|
-
- example/public/
|
174
|
-
- example/public/
|
175
|
-
- example/
|
176
|
-
- example/
|
177
|
-
- example/test/fixtures
|
178
|
-
- example/test/fixtures/
|
179
|
-
- example/test/fixtures/
|
180
|
-
- example/test/
|
181
|
-
- example/test/functional
|
182
|
-
- example/test/functional/
|
183
|
-
- example/test/functional/
|
184
|
-
- example/test/
|
185
|
-
- example/test/
|
186
|
-
- example/test/
|
187
|
-
- example/test/
|
188
|
-
- example/test/unit
|
189
|
-
- example/test/unit/
|
190
|
-
- example/test/unit/
|
191
|
-
- example/test/unit/helpers/
|
192
|
-
- example/test/unit/helpers/
|
193
|
-
- example/test/unit/
|
194
|
-
- example/
|
195
|
-
- example/vendor/assets/
|
196
|
-
- example/vendor/
|
197
|
-
-
|
198
|
-
-
|
199
|
-
- lib/hashbrowns
|
200
|
-
- lib/hashbrowns/
|
201
|
-
- lib/hashbrowns/helpers/
|
202
|
-
- lib/hashbrowns/helpers/
|
203
|
-
- lib/hashbrowns/helpers/
|
204
|
-
- lib/hashbrowns/helpers/
|
205
|
-
- lib/hashbrowns/
|
206
|
-
- lib/hashbrowns/
|
207
|
-
- lib/hashbrowns/views/hashbrowns/
|
208
|
-
-
|
209
|
-
- test/
|
75
|
+
|
76
|
+
extra_rdoc_files:
|
77
|
+
- LICENSE.txt
|
78
|
+
- README.md
|
79
|
+
- TODO
|
80
|
+
files:
|
81
|
+
- .document
|
82
|
+
- .rvmrc
|
83
|
+
- Gemfile
|
84
|
+
- Gemfile.lock
|
85
|
+
- LICENSE.txt
|
86
|
+
- README.md
|
87
|
+
- Rakefile
|
88
|
+
- TODO
|
89
|
+
- VERSION
|
90
|
+
- example/.gitignore
|
91
|
+
- example/.rvmrc
|
92
|
+
- example/Gemfile
|
93
|
+
- example/Gemfile.lock
|
94
|
+
- example/README.rdoc
|
95
|
+
- example/Rakefile
|
96
|
+
- example/app/assets/images/rails.png
|
97
|
+
- example/app/assets/javascripts/application.js
|
98
|
+
- example/app/assets/javascripts/customers.js.coffee
|
99
|
+
- example/app/assets/javascripts/destinations.js.coffee
|
100
|
+
- example/app/assets/javascripts/orders.js.coffee
|
101
|
+
- example/app/assets/stylesheets/application.css.scss
|
102
|
+
- example/app/assets/stylesheets/bootstrap_and_overrides.css.scss
|
103
|
+
- example/app/assets/stylesheets/customers.css.scss
|
104
|
+
- example/app/assets/stylesheets/destinations.css.scss
|
105
|
+
- example/app/assets/stylesheets/orders.css.scss
|
106
|
+
- example/app/assets/stylesheets/scaffolds.css.scss
|
107
|
+
- example/app/controllers/application_controller.rb
|
108
|
+
- example/app/controllers/customers_controller.rb
|
109
|
+
- example/app/controllers/destinations_controller.rb
|
110
|
+
- example/app/controllers/orders_controller.rb
|
111
|
+
- example/app/helpers/application_helper.rb
|
112
|
+
- example/app/helpers/customers_helper.rb
|
113
|
+
- example/app/helpers/destinations_helper.rb
|
114
|
+
- example/app/helpers/orders_helper.rb
|
115
|
+
- example/app/mailers/.gitkeep
|
116
|
+
- example/app/models/.gitkeep
|
117
|
+
- example/app/models/customer.rb
|
118
|
+
- example/app/models/destination.rb
|
119
|
+
- example/app/models/order.rb
|
120
|
+
- example/app/views/customers/_form.html.erb
|
121
|
+
- example/app/views/customers/edit.html.erb
|
122
|
+
- example/app/views/customers/full.rabl
|
123
|
+
- example/app/views/customers/index.html.erb
|
124
|
+
- example/app/views/customers/index.rabl
|
125
|
+
- example/app/views/customers/new.html.erb
|
126
|
+
- example/app/views/customers/show.html.erb
|
127
|
+
- example/app/views/customers/show.rabl
|
128
|
+
- example/app/views/destinations/_form.html.erb
|
129
|
+
- example/app/views/destinations/edit.html.erb
|
130
|
+
- example/app/views/destinations/full.rabl
|
131
|
+
- example/app/views/destinations/index.html.erb
|
132
|
+
- example/app/views/destinations/index.rabl
|
133
|
+
- example/app/views/destinations/new.html.erb
|
134
|
+
- example/app/views/destinations/show.html.erb
|
135
|
+
- example/app/views/destinations/show.rabl
|
136
|
+
- example/app/views/layouts/application.html.erb
|
137
|
+
- example/app/views/orders/_form.html.erb
|
138
|
+
- example/app/views/orders/edit.html.erb
|
139
|
+
- example/app/views/orders/full.rabl
|
140
|
+
- example/app/views/orders/index.html.erb
|
141
|
+
- example/app/views/orders/index.rabl
|
142
|
+
- example/app/views/orders/new.html.erb
|
143
|
+
- example/app/views/orders/show.html.erb
|
144
|
+
- example/app/views/orders/show.rabl
|
145
|
+
- example/config.ru
|
146
|
+
- example/config/application.rb
|
147
|
+
- example/config/boot.rb
|
148
|
+
- example/config/database.yml
|
149
|
+
- example/config/environment.rb
|
150
|
+
- example/config/environments/development.rb
|
151
|
+
- example/config/environments/production.rb
|
152
|
+
- example/config/environments/test.rb
|
153
|
+
- example/config/initializers/backtrace_silencers.rb
|
154
|
+
- example/config/initializers/hashbrowns.rb
|
155
|
+
- example/config/initializers/inflections.rb
|
156
|
+
- example/config/initializers/mime_types.rb
|
157
|
+
- example/config/initializers/secret_token.rb
|
158
|
+
- example/config/initializers/session_store.rb
|
159
|
+
- example/config/initializers/wrap_parameters.rb
|
160
|
+
- example/config/locales/en.yml
|
161
|
+
- example/config/routes.rb
|
162
|
+
- example/db/migrate/20121102164922_create_customers.rb
|
163
|
+
- example/db/migrate/20121102165116_create_orders.rb
|
164
|
+
- example/db/migrate/20121102165208_create_destinations.rb
|
165
|
+
- example/db/schema.rb
|
166
|
+
- example/db/seeds.rb
|
167
|
+
- example/lib/assets/.gitkeep
|
168
|
+
- example/lib/tasks/.gitkeep
|
169
|
+
- example/log/.gitkeep
|
170
|
+
- example/public/404.html
|
171
|
+
- example/public/422.html
|
172
|
+
- example/public/500.html
|
173
|
+
- example/public/favicon.ico
|
174
|
+
- example/public/index.html
|
175
|
+
- example/public/robots.txt
|
176
|
+
- example/script/rails
|
177
|
+
- example/test/fixtures/.gitkeep
|
178
|
+
- example/test/fixtures/customers.yml
|
179
|
+
- example/test/fixtures/destinations.yml
|
180
|
+
- example/test/fixtures/orders.yml
|
181
|
+
- example/test/functional/.gitkeep
|
182
|
+
- example/test/functional/customers_controller_test.rb
|
183
|
+
- example/test/functional/destinations_controller_test.rb
|
184
|
+
- example/test/functional/orders_controller_test.rb
|
185
|
+
- example/test/integration/.gitkeep
|
186
|
+
- example/test/performance/browsing_test.rb
|
187
|
+
- example/test/test_helper.rb
|
188
|
+
- example/test/unit/.gitkeep
|
189
|
+
- example/test/unit/customer_test.rb
|
190
|
+
- example/test/unit/destination_test.rb
|
191
|
+
- example/test/unit/helpers/customers_helper_test.rb
|
192
|
+
- example/test/unit/helpers/destinations_helper_test.rb
|
193
|
+
- example/test/unit/helpers/orders_helper_test.rb
|
194
|
+
- example/test/unit/order_test.rb
|
195
|
+
- example/vendor/assets/javascripts/.gitkeep
|
196
|
+
- example/vendor/assets/stylesheets/.gitkeep
|
197
|
+
- example/vendor/plugins/.gitkeep
|
198
|
+
- hashbrowns.gemspec
|
199
|
+
- lib/hashbrowns.rb
|
200
|
+
- lib/hashbrowns/configuration.rb
|
201
|
+
- lib/hashbrowns/helpers/display_helpers.rb
|
202
|
+
- lib/hashbrowns/helpers/links_helpers.rb
|
203
|
+
- lib/hashbrowns/helpers/overview_helpers.rb
|
204
|
+
- lib/hashbrowns/helpers/relations_helpers.rb
|
205
|
+
- lib/hashbrowns/helpers/renderer_helpers.rb
|
206
|
+
- lib/hashbrowns/railtie.rb
|
207
|
+
- lib/hashbrowns/views/hashbrowns/_overview.html.haml
|
208
|
+
- lib/hashbrowns/views/hashbrowns/_recursive_hash_tabler.html.haml
|
209
|
+
- test/helper.rb
|
210
|
+
- test/test_hash_tabler.rb
|
210
211
|
homepage: http://github.com/crimsonknave/hashbrowns
|
211
|
-
licenses:
|
212
|
-
- MIT
|
212
|
+
licenses:
|
213
|
+
- MIT
|
213
214
|
post_install_message:
|
214
215
|
rdoc_options: []
|
215
|
-
|
216
|
-
|
217
|
-
|
216
|
+
|
217
|
+
require_paths:
|
218
|
+
- lib
|
219
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
218
220
|
none: false
|
219
|
-
requirements:
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
|
+
requirements:
|
222
|
+
- - ">="
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: "0"
|
225
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
224
226
|
none: false
|
225
|
-
requirements:
|
226
|
-
|
227
|
-
|
228
|
-
|
227
|
+
requirements:
|
228
|
+
- - ">="
|
229
|
+
- !ruby/object:Gem::Version
|
230
|
+
version: "0"
|
229
231
|
requirements: []
|
232
|
+
|
230
233
|
rubyforge_project:
|
231
|
-
rubygems_version: 1.8.
|
234
|
+
rubygems_version: 1.8.9
|
232
235
|
signing_key:
|
233
236
|
specification_version: 3
|
234
237
|
summary: Cooks your hashes into html
|
235
238
|
test_files: []
|
239
|
+
|