arbre 1.0.0.rc4 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +6 -3
  3. data/.rubocop.yml +15 -0
  4. data/.travis.yml +16 -0
  5. data/CHANGELOG.md +86 -3
  6. data/Gemfile +17 -5
  7. data/Gemfile.lock +224 -0
  8. data/LICENSE +20 -0
  9. data/README.md +43 -0
  10. data/Rakefile +19 -0
  11. data/arbre.gemspec +3 -0
  12. data/docs/Gemfile +2 -0
  13. data/docs/_config.yml +7 -0
  14. data/docs/_includes/footer.html +8 -0
  15. data/docs/_includes/google-analytics.html +16 -0
  16. data/docs/_includes/head.html +7 -0
  17. data/docs/_includes/toc.html +12 -0
  18. data/docs/_includes/top-menu.html +8 -0
  19. data/docs/_layouts/default.html +21 -0
  20. data/docs/index.md +106 -0
  21. data/docs/stylesheets/main.css +1152 -0
  22. data/lib/arbre/context.rb +34 -3
  23. data/lib/arbre/element/builder_methods.rb +4 -5
  24. data/lib/arbre/element/proxy.rb +28 -0
  25. data/lib/arbre/element.rb +12 -6
  26. data/lib/arbre/element_collection.rb +1 -1
  27. data/lib/arbre/html/attributes.rb +11 -2
  28. data/lib/arbre/html/class_list.rb +4 -0
  29. data/lib/arbre/html/document.rb +1 -1
  30. data/lib/arbre/html/html5_elements.rb +4 -4
  31. data/lib/arbre/html/tag.rb +24 -9
  32. data/lib/arbre/html/text_node.rb +4 -0
  33. data/lib/arbre/rails/forms.rb +70 -67
  34. data/lib/arbre/rails/template_handler.rb +7 -5
  35. data/lib/arbre/version.rb +1 -1
  36. data/spec/arbre/integration/html_spec.rb +118 -110
  37. data/spec/arbre/unit/component_spec.rb +9 -9
  38. data/spec/arbre/unit/context_spec.rb +8 -8
  39. data/spec/arbre/unit/element_finder_methods_spec.rb +44 -29
  40. data/spec/arbre/unit/element_spec.rb +64 -45
  41. data/spec/arbre/unit/html/class_list_spec.rb +16 -0
  42. data/spec/arbre/unit/html/tag_attributes_spec.rb +20 -18
  43. data/spec/arbre/unit/html/tag_spec.rb +51 -15
  44. data/spec/changelog_spec.rb +27 -0
  45. data/spec/rails/integration/forms_spec.rb +14 -30
  46. data/spec/rails/integration/rendering_spec.rb +46 -20
  47. data/spec/rails/rails_spec_helper.rb +8 -11
  48. data/spec/rails/stub_app/log/.gitignore +1 -1
  49. data/spec/rails/support/mock_person.rb +15 -0
  50. data/spec/rails/templates/arbre/_partial_with_assignment.arb +1 -0
  51. data/spec/rails/templates/arbre/page_with_arb_partial_and_assignment.arb +3 -0
  52. data/tasks/lint.rake +69 -0
  53. data/tasks/release.rake +6 -0
  54. metadata +43 -47
  55. data/.DS_Store +0 -0
  56. data/README.rdoc +0 -69
  57. data/lib/.DS_Store +0 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 27066f3cf1264e3ec0cb4e5498c05b706565055fe69fbc25afe98825c90915bd
4
+ data.tar.gz: efe323ea9b3faddac096ca11d796231fd5d0872f8f4e1ffec71c2bbf452a5cd1
5
+ SHA512:
6
+ metadata.gz: d40b99ace19107c5b2d9089d183cce4b2eebc5229475f1ac8965df1fb6a31412d5dc0787ad618063d966ef4821ce679bd0d77ddf16a38048f13dde26192d3acc
7
+ data.tar.gz: 2346922bcc1c31da78a980ca68f20f7c8335a4fdf14c6cd90e766c23fea5cd70f0ec44aabf3ab989b9ae2f863f3b332c1e351fdb2096b59df56bef656ef324f6
data/.gitignore CHANGED
@@ -1,7 +1,10 @@
1
1
  *.gem
2
2
  .bundle
3
- Gemfile.lock
4
3
  pkg/*
5
4
  benchmarks
6
- /.rvmrc
7
- /tags
5
+ .rvmrc
6
+ .ruby-version
7
+ .ruby-gemset
8
+ tags
9
+ .DS_Store
10
+ docs/_site
data/.rubocop.yml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+
3
+ AllCops:
4
+ DisabledByDefault: true
5
+
6
+ DisplayCopNames: true
7
+ DisplayStyleGuide: true
8
+
9
+ TargetRubyVersion: 2.3
10
+
11
+ Metrics:
12
+ Enabled: false
13
+
14
+ Layout/IndentHeredoc:
15
+ Enabled: true
data/.travis.yml ADDED
@@ -0,0 +1,16 @@
1
+ language: ruby
2
+ sudo: false
3
+ before_install:
4
+ - gem update --system 3.0.3
5
+ - gem install bundler:2.0.1
6
+ rvm:
7
+ - 2.3.8
8
+ - 2.4.5
9
+ - 2.5.5
10
+ - 2.6.2
11
+ - jruby-9.1.17.0
12
+ - jruby-9.2.6.0
13
+ branches:
14
+ only:
15
+ - master
16
+ cache: bundler
data/CHANGELOG.md CHANGED
@@ -1,13 +1,63 @@
1
- ## 1.0.0.rc4
1
+ # Changelog
2
+
3
+ ## Master (unreleased)
4
+
5
+ ## 1.2.1 [☰](https://github.com/activeadmin/arbre/compare/v1.2.0...v1.2.1)
6
+
7
+ * Revert [#64][] to fix several regressions, at the cost of reintroducing [#46][]. [#121][] by [@deivid-rodriguez][]
8
+
9
+ ## 1.2.0 [☰](https://github.com/activeadmin/arbre/compare/v1.2.0.rc1...v1.2.0)
10
+
11
+ _No changes_.
12
+
13
+ ## 1.2.0.rc1 [☰](https://github.com/activeadmin/arbre/compare/v1.1.1...v1.2.0.rc1)
14
+
15
+ * Fix deprecation warning about single arity template handlers on Rails 6. [#110][] by [@aramvisser][]
16
+ * Fix rendering `link_to` with a block in a arbre template. [#64][] by [@varyonic][]
17
+ * Drop support for EOL'd rubies (under 2.3). [#78][] by [@deivid-rodriguez][]
18
+
19
+ ## 1.1.1 [☰](https://github.com/activeadmin/arbre/compare/v1.1.0...v1.1.1)
20
+
21
+ * Use mime-types 2.x for Ruby 1.9 by [@timoschilling][]
22
+ * Verify Ruby 2.3 support. [#59][] by [@dlackty][]
23
+
24
+ ## 1.1.0 [☰](https://github.com/activeadmin/arbre/compare/v1.0.3...v1.1.0)
25
+
26
+ * Tag option `for` sets the attribute when value is a string or symbol [#49][] by [@ramontayag][]
27
+
28
+ ## 1.0.3 [☰](https://github.com/activeadmin/arbre/compare/v1.0.2...v1.0.3)
29
+
30
+ * Performance improvements [#40][] by [@alexesDev][]
31
+ * Added all void elements as self-closing tags [#39][] by [@OscarBarrett][]
32
+ * Missing tags added [#36][] / [#39][] by [@dtaniwaki][] and [@OscarBarrett][]
33
+
34
+ ## 1.0.2 [☰](https://github.com/activeadmin/arbre/compare/v1.0.1...v1.0.2)
35
+
36
+ * make `Element#inspect` behave correctly in Ruby 2.0 [#16][] by [@seanlinsley][]
37
+ * prevent `Arbre::Element#flatten` infinite recursion [#32][] by [@seanlinsley][]
38
+ * make `find_by_class` correctly find children by class [#33][] by [@kaapa][]
39
+
40
+ ## 1.0.1 [☰](https://github.com/activeadmin/arbre/compare/v1.0.0...v1.0.1)
41
+
42
+ * Template handler converts to string to satisfy Rack::Lint [#6][] by [@jpmckinney][]
43
+ * Fix to `Tag#add_class` when passing a string of classes to Tag build method
44
+ [#4][] by [@gregbell][]
45
+ * Not longer uses the default separator [#7][] by [@LTe][]
46
+
47
+ ## 1.0.0 [☰](https://github.com/activeadmin/arbre/compare/v1.0.0.rc4...v1.0.0)
48
+
49
+ * Added support for the use of `:for` with non Active Model objects
50
+
51
+ ## 1.0.0.rc4 [☰](https://github.com/activeadmin/arbre/compare/v1.0.0.rc3...v1.0.0.rc4)
2
52
 
3
53
  * Fix issue where user could call `symbolize_keys!` on a
4
54
  HashWithIndifferentAccess which doesn't implement the method
5
55
 
6
- ## 1.0.0.rc3
56
+ ## 1.0.0.rc3 [☰](https://github.com/activeadmin/arbre/compare/v1.0.0.rc2...v1.0.0.rc3)
7
57
 
8
58
  * Implemented `Arbre::HTML::Tag#default_id_for_prefix`
9
59
 
10
- ## 1.0.0.rc2
60
+ ## 1.0.0.rc2 [☰](https://github.com/activeadmin/arbre/compare/v1.0.0.rc1...v1.0.0.rc2)
11
61
 
12
62
  * Fixed bug where Component's build methods were being rendered within the
13
63
  parent context.
@@ -15,3 +65,36 @@
15
65
  ## 1.0.0.rc1
16
66
 
17
67
  Initial release and extraction from Active Admin
68
+
69
+ <!--- The following link definition list is generated by PimpMyChangelog --->
70
+ [#4]: https://github.com/activeadmin/arbre/issues/4
71
+ [#6]: https://github.com/activeadmin/arbre/issues/6
72
+ [#7]: https://github.com/activeadmin/arbre/issues/7
73
+ [#16]: https://github.com/activeadmin/arbre/issues/16
74
+ [#32]: https://github.com/activeadmin/arbre/issues/32
75
+ [#33]: https://github.com/activeadmin/arbre/issues/33
76
+ [#36]: https://github.com/activeadmin/arbre/issues/36
77
+ [#39]: https://github.com/activeadmin/arbre/issues/39
78
+ [#40]: https://github.com/activeadmin/arbre/issues/40
79
+ [#46]: https://github.com/activeadmin/arbre/issues/46
80
+ [#49]: https://github.com/activeadmin/arbre/issues/49
81
+ [#59]: https://github.com/activeadmin/arbre/issues/59
82
+ [#64]: https://github.com/activeadmin/arbre/pull/64
83
+ [#78]: https://github.com/activeadmin/arbre/pull/78
84
+ [#110]: https://github.com/activeadmin/arbre/pull/110
85
+ [#121]: https://github.com/activeadmin/arbre/pull/121
86
+
87
+ [@aramvisser]: https://github.com/aramvisser
88
+ [@LTe]: https://github.com/LTe
89
+ [@OscarBarrett]: https://github.com/OscarBarrett
90
+ [@alexesDev]: https://github.com/alexesDev
91
+ [@deivid-rodriguez]: https://github.com/deivid-rodriguez
92
+ [@dlackty]: https://github.com/dlackty
93
+ [@dtaniwaki]: https://github.com/dtaniwaki
94
+ [@gregbell]: https://github.com/gregbell
95
+ [@jpmckinney]: https://github.com/jpmckinney
96
+ [@kaapa]: https://github.com/kaapa
97
+ [@ramontayag]: https://github.com/ramontayag
98
+ [@seanlinsley]: https://github.com/seanlinsley
99
+ [@timoschilling]: https://github.com/timoschilling
100
+ [@varyonic]: https://github.com/varyonic
data/Gemfile CHANGED
@@ -1,13 +1,25 @@
1
- source "http://rubygems.org"
1
+ source 'http://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
+ gem 'rake'
6
+
5
7
  group :test do
6
- gem "rspec"
8
+ gem 'rspec'
9
+ gem 'pry'
10
+ end
11
+
12
+ group :tools do
13
+ gem 'rubocop'
14
+ end
15
+
16
+ group :release do
17
+ gem 'chandler'
7
18
  end
8
19
 
9
20
  group :rails do
10
- gem "rspec-rails"
11
- gem 'combustion', '0.3.2'
12
- gem "capybara"
21
+ gem 'rails', '>= 5.0.0.1' # fixes CVE-2016-6316
22
+ gem 'rspec-rails'
23
+ gem 'combustion'
24
+ gem 'capybara'
13
25
  end
data/Gemfile.lock ADDED
@@ -0,0 +1,224 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ arbre (1.2.1)
5
+ activesupport (>= 3.0.0)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ actioncable (5.2.3)
11
+ actionpack (= 5.2.3)
12
+ nio4r (~> 2.0)
13
+ websocket-driver (>= 0.6.1)
14
+ actionmailer (5.2.3)
15
+ actionpack (= 5.2.3)
16
+ actionview (= 5.2.3)
17
+ activejob (= 5.2.3)
18
+ mail (~> 2.5, >= 2.5.4)
19
+ rails-dom-testing (~> 2.0)
20
+ actionpack (5.2.3)
21
+ actionview (= 5.2.3)
22
+ activesupport (= 5.2.3)
23
+ rack (~> 2.0)
24
+ rack-test (>= 0.6.3)
25
+ rails-dom-testing (~> 2.0)
26
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
+ actionview (5.2.3)
28
+ activesupport (= 5.2.3)
29
+ builder (~> 3.1)
30
+ erubi (~> 1.4)
31
+ rails-dom-testing (~> 2.0)
32
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
33
+ activejob (5.2.3)
34
+ activesupport (= 5.2.3)
35
+ globalid (>= 0.3.6)
36
+ activemodel (5.2.3)
37
+ activesupport (= 5.2.3)
38
+ activerecord (5.2.3)
39
+ activemodel (= 5.2.3)
40
+ activesupport (= 5.2.3)
41
+ arel (>= 9.0)
42
+ activestorage (5.2.3)
43
+ actionpack (= 5.2.3)
44
+ activerecord (= 5.2.3)
45
+ marcel (~> 0.3.1)
46
+ activesupport (5.2.3)
47
+ concurrent-ruby (~> 1.0, >= 1.0.2)
48
+ i18n (>= 0.7, < 2)
49
+ minitest (~> 5.1)
50
+ tzinfo (~> 1.1)
51
+ addressable (2.5.2)
52
+ public_suffix (>= 2.0.2, < 4.0)
53
+ arel (9.0.0)
54
+ ast (2.4.0)
55
+ builder (3.2.3)
56
+ capybara (3.15.0)
57
+ addressable
58
+ mini_mime (>= 0.1.3)
59
+ nokogiri (~> 1.8)
60
+ rack (>= 1.6.0)
61
+ rack-test (>= 0.6.3)
62
+ regexp_parser (~> 1.2)
63
+ xpath (~> 3.2)
64
+ chandler (0.9.0)
65
+ netrc
66
+ octokit (>= 2.2.0)
67
+ coderay (1.1.2)
68
+ combustion (1.1.0)
69
+ activesupport (>= 3.0.0)
70
+ railties (>= 3.0.0)
71
+ thor (>= 0.14.6)
72
+ concurrent-ruby (1.1.5)
73
+ crass (1.0.4)
74
+ diff-lcs (1.3)
75
+ erubi (1.8.0)
76
+ faraday (0.15.4)
77
+ multipart-post (>= 1.2, < 3)
78
+ ffi (1.9.25-java)
79
+ globalid (0.4.2)
80
+ activesupport (>= 4.2.0)
81
+ i18n (1.6.0)
82
+ concurrent-ruby (~> 1.0)
83
+ jar-dependencies (0.4.0)
84
+ jaro_winkler (1.5.2)
85
+ jaro_winkler (1.5.2-java)
86
+ loofah (2.2.3)
87
+ crass (~> 1.0.2)
88
+ nokogiri (>= 1.5.9)
89
+ mail (2.7.1)
90
+ mini_mime (>= 0.1.1)
91
+ marcel (0.3.3)
92
+ mimemagic (~> 0.3.2)
93
+ method_source (0.9.2)
94
+ mimemagic (0.3.3)
95
+ mini_mime (1.0.1)
96
+ mini_portile2 (2.4.0)
97
+ minitest (5.11.3)
98
+ multipart-post (2.0.0)
99
+ netrc (0.11.0)
100
+ nio4r (2.3.1)
101
+ nio4r (2.3.1-java)
102
+ nokogiri (1.10.2)
103
+ mini_portile2 (~> 2.4.0)
104
+ nokogiri (1.10.2-java)
105
+ octokit (4.13.0)
106
+ sawyer (~> 0.8.0, >= 0.5.3)
107
+ parallel (1.17.0)
108
+ parser (2.6.2.1)
109
+ ast (~> 2.4.0)
110
+ pry (0.12.2)
111
+ coderay (~> 1.1.0)
112
+ method_source (~> 0.9.0)
113
+ pry (0.12.2-java)
114
+ coderay (~> 1.1.0)
115
+ method_source (~> 0.9.0)
116
+ spoon (~> 0.0)
117
+ psych (3.1.0)
118
+ psych (3.1.0-java)
119
+ jar-dependencies (>= 0.1.7)
120
+ public_suffix (3.0.3)
121
+ rack (2.0.6)
122
+ rack-test (1.1.0)
123
+ rack (>= 1.0, < 3)
124
+ rails (5.2.3)
125
+ actioncable (= 5.2.3)
126
+ actionmailer (= 5.2.3)
127
+ actionpack (= 5.2.3)
128
+ actionview (= 5.2.3)
129
+ activejob (= 5.2.3)
130
+ activemodel (= 5.2.3)
131
+ activerecord (= 5.2.3)
132
+ activestorage (= 5.2.3)
133
+ activesupport (= 5.2.3)
134
+ bundler (>= 1.3.0)
135
+ railties (= 5.2.3)
136
+ sprockets-rails (>= 2.0.0)
137
+ rails-dom-testing (2.0.3)
138
+ activesupport (>= 4.2.0)
139
+ nokogiri (>= 1.6)
140
+ rails-html-sanitizer (1.0.4)
141
+ loofah (~> 2.2, >= 2.2.2)
142
+ railties (5.2.3)
143
+ actionpack (= 5.2.3)
144
+ activesupport (= 5.2.3)
145
+ method_source
146
+ rake (>= 0.8.7)
147
+ thor (>= 0.19.0, < 2.0)
148
+ rainbow (3.0.0)
149
+ rake (12.3.2)
150
+ regexp_parser (1.3.0)
151
+ rspec (3.8.0)
152
+ rspec-core (~> 3.8.0)
153
+ rspec-expectations (~> 3.8.0)
154
+ rspec-mocks (~> 3.8.0)
155
+ rspec-core (3.8.0)
156
+ rspec-support (~> 3.8.0)
157
+ rspec-expectations (3.8.2)
158
+ diff-lcs (>= 1.2.0, < 2.0)
159
+ rspec-support (~> 3.8.0)
160
+ rspec-mocks (3.8.0)
161
+ diff-lcs (>= 1.2.0, < 2.0)
162
+ rspec-support (~> 3.8.0)
163
+ rspec-rails (3.8.2)
164
+ actionpack (>= 3.0)
165
+ activesupport (>= 3.0)
166
+ railties (>= 3.0)
167
+ rspec-core (~> 3.8.0)
168
+ rspec-expectations (~> 3.8.0)
169
+ rspec-mocks (~> 3.8.0)
170
+ rspec-support (~> 3.8.0)
171
+ rspec-support (3.8.0)
172
+ rubocop (0.67.2)
173
+ jaro_winkler (~> 1.5.1)
174
+ parallel (~> 1.10)
175
+ parser (>= 2.5, != 2.5.1.1)
176
+ psych (>= 3.1.0)
177
+ rainbow (>= 2.2.2, < 4.0)
178
+ ruby-progressbar (~> 1.7)
179
+ unicode-display_width (>= 1.4.0, < 1.6)
180
+ ruby-progressbar (1.10.0)
181
+ sawyer (0.8.1)
182
+ addressable (>= 2.3.5, < 2.6)
183
+ faraday (~> 0.8, < 1.0)
184
+ spoon (0.0.6)
185
+ ffi
186
+ sprockets (3.7.2)
187
+ concurrent-ruby (~> 1.0)
188
+ rack (> 1, < 3)
189
+ sprockets-rails (3.2.1)
190
+ actionpack (>= 4.0)
191
+ activesupport (>= 4.0)
192
+ sprockets (>= 3.0.0)
193
+ thor (0.20.3)
194
+ thread_safe (0.3.6)
195
+ thread_safe (0.3.6-java)
196
+ tzinfo (1.2.5)
197
+ thread_safe (~> 0.1)
198
+ unicode-display_width (1.5.0)
199
+ websocket-driver (0.7.0)
200
+ websocket-extensions (>= 0.1.0)
201
+ websocket-driver (0.7.0-java)
202
+ websocket-extensions (>= 0.1.0)
203
+ websocket-extensions (0.1.3)
204
+ xpath (3.2.0)
205
+ nokogiri (~> 1.8)
206
+
207
+ PLATFORMS
208
+ java
209
+ ruby
210
+
211
+ DEPENDENCIES
212
+ arbre!
213
+ capybara
214
+ chandler
215
+ combustion
216
+ pry
217
+ rails (>= 5.0.0.1)
218
+ rake
219
+ rspec
220
+ rspec-rails
221
+ rubocop
222
+
223
+ BUNDLED WITH
224
+ 2.0.1
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2013 Greg Bell
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Arbre - HTML Views in Ruby
2
+
3
+ [Arbre][docs] makes it easy to generate HTML directly in Ruby. This gem was extracted from [Active Admin](https://github.com/activeadmin/active_admin).
4
+
5
+ [![Version ][rubygems_badge]][rubygems]
6
+ [![Travis CI ][travis_badge]][travis]
7
+ [![Tidelift ][tidelift_badge]][tidelift]
8
+
9
+ ## Goals
10
+
11
+ The purpose of Arbre is to leave the view as ruby objects as long
12
+ as possible. This allows OO Design to be used to implement the view layer.
13
+
14
+ ## Getting started
15
+
16
+ * Check out [the docs][docs].
17
+
18
+ ## Need help?
19
+
20
+ Please use [StackOverflow][stackoverflow] for help requests and how-to questions.
21
+
22
+ Please open GitHub issues for bugs and enhancements only, not general help requests.
23
+ Please search previous issues (and Google and StackOverflow) before creating a new issue.
24
+
25
+ ## Want to support us?
26
+
27
+ Subscribe to [Tidelift][tidelift] to support Arbre and get licensing assurances and timely security notifications.
28
+
29
+ ## Security contact information
30
+
31
+ Please use the Tidelift security contact to [report a security vulnerability][Tidelift security contact].
32
+ Tidelift will coordinate the fix and disclosure.
33
+
34
+ [rubygems_badge]: http://img.shields.io/gem/v/arbre.svg
35
+ [rubygems]: https://rubygems.org/gems/arbre
36
+ [travis_badge]: http://img.shields.io/travis/activeadmin/arbre/master.svg
37
+ [travis]: https://travis-ci.org/activeadmin/arbre
38
+ [tidelift_badge]: https://tidelift.com/badges/github/activeadmin/arbre
39
+ [tidelift]: https://tidelift.com/subscription/pkg/rubygems-arbre?utm_source=rubygems-arbre&utm_medium=readme
40
+
41
+ [docs]: https://activeadmin.github.io/arbre/
42
+ [stackoverflow]: http://stackoverflow.com/questions/tagged/arbre
43
+ [Tidelift security contact]: https://tidelift.com/security
data/Rakefile CHANGED
@@ -1,2 +1,21 @@
1
1
  require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
+
4
+ require 'rspec/core/rake_task'
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ import 'tasks/lint.rake'
8
+ import 'tasks/release.rake'
9
+
10
+ task default: [:spec, :lint]
11
+
12
+ task :console do
13
+ require 'irb'
14
+ require 'irb/completion'
15
+
16
+ require 'pry'
17
+ require 'arbre'
18
+
19
+ ARGV.clear
20
+ IRB.start
21
+ end
data/arbre.gemspec CHANGED
@@ -11,11 +11,14 @@ Gem::Specification.new do |s|
11
11
  s.homepage = ""
12
12
  s.summary = %q{An Object Oriented DOM Tree in Ruby}
13
13
  s.description = %q{An Object Oriented DOM Tree in Ruby}
14
+ s.license = "MIT"
14
15
 
15
16
  s.files = `git ls-files`.split("\n")
16
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
19
  s.require_paths = ["lib"]
19
20
 
21
+ s.required_ruby_version = '>= 2.3'
22
+
20
23
  s.add_dependency("activesupport", ">= 3.0.0")
21
24
  end
data/docs/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ gem 'github-pages'
2
+ gem 'jekyll-redirect-from'
data/docs/_config.yml ADDED
@@ -0,0 +1,7 @@
1
+ plugins:
2
+ - jekyll-redirect-from
3
+
4
+ defaults:
5
+ -
6
+ values:
7
+ layout: "default"
@@ -0,0 +1,8 @@
1
+ <p id="footer">
2
+ <div class="left">
3
+ Copyright 2011 <a href="http://gregbell.ca/">Greg Bell</a> and <a href="http://www.versapay.com/">VersaPay</a>
4
+ </div>
5
+ <div class="right">
6
+ <a href="http://twitter.com/share" class="twitter-share-button">Tweet</a></p>
7
+ </div>
8
+ </p>
@@ -0,0 +1,16 @@
1
+ <script type="text/javascript">
2
+
3
+ var _gaq = _gaq || [];
4
+ _gaq.push(['_setAccount', 'UA-23306458-1']);
5
+ _gaq.push(['_trackPageview']);
6
+
7
+ (function () {
8
+ var ga = document.createElement('script');
9
+ ga.type = 'text/javascript';
10
+ ga.async = true;
11
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
12
+ var s = document.getElementsByTagName('script')[0];
13
+ s.parentNode.insertBefore(ga, s);
14
+ })();
15
+
16
+ </script>
@@ -0,0 +1,7 @@
1
+ <head>
2
+ <title>Arbre | HTML Views in Ruby</title>
3
+ <link href='//fonts.googleapis.com/css?family=Yanone+Kaffeesatz:extralight,light,regular,bold' rel='stylesheet' type='text/css'>
4
+ <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
5
+ <link href="{{ site.baseurl }}/stylesheets/main.css" media="screen" rel="stylesheet" type="text/css" />
6
+ <script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
7
+ </head>
@@ -0,0 +1,12 @@
1
+ <ol class='level-1'>
2
+ <li><a href='{{ site.baseurl }}'>Contents</a></li>
3
+ <ol class='level-2'>
4
+ <li><a href='{{ site.baseurl }}#introduction'>Introduction</a></li>
5
+ <li><a href='{{ site.baseurl }}#installation'>Installation</a></li>
6
+ <li><a href='{{ site.baseurl }}#tags'>Tags</a></li>
7
+ <li><a href='{{ site.baseurl }}#componenets'>Components</a></li>
8
+ <li><a href='{{ site.baseurl }}#contexts'>Contexts</a></li>
9
+ <!-- li><a href='{{ site.baseurl }}/documentation.html#layouts'>Layouts</a></li -->
10
+ <li><a href='{{ site.baseurl }}#background'>Background</a></li>
11
+ </ol>
12
+ </ol>
@@ -0,0 +1,8 @@
1
+ <div id="header">
2
+ <h1><a href="{{ site.baseurl }}/index.html"><span>Arbre</span></a></h1>
3
+
4
+ <div id="nav">
5
+ <!-- a href="{{ site.baseurl }}/documentation.html">Documentation</a -->
6
+ <a href="http://github.com/activeadmin/arbre">Get the Code</a>
7
+ </div>
8
+ </div>
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ {% include head.html %}
4
+ <body class="with-sidebar">
5
+ <div id="wrapper">
6
+ {% include top-menu.html %}
7
+ <div id="main-content">
8
+ <div class='toc'>
9
+ {% include toc.html %}
10
+ </div>
11
+ <div class='toc-content'>
12
+ <div class='docs-content'>
13
+ {{ content }}
14
+ </div>
15
+ </div>
16
+ </div>
17
+ {% include footer.html %}
18
+ </div>
19
+ {% include google-analytics.html %}
20
+ </body>
21
+ </html>