amber_component 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -1
  5. data/CONTRIBUTING.md +87 -0
  6. data/Gemfile +3 -0
  7. data/Gemfile.lock +16 -91
  8. data/README.md +25 -42
  9. data/Rakefile +17 -1
  10. data/amber_component.gemspec +4 -2
  11. data/banner.png +0 -0
  12. data/docs/.bundle/config +2 -0
  13. data/docs/.gitignore +5 -0
  14. data/docs/404.html +25 -0
  15. data/docs/Gemfile +37 -0
  16. data/docs/Gemfile.lock +89 -0
  17. data/docs/README.md +19 -0
  18. data/docs/_config.yml +148 -0
  19. data/docs/_data/amber_component.yml +3 -0
  20. data/docs/_sass/_variables.scss +2 -0
  21. data/docs/_sass/color_schemes/amber_component.scss +11 -0
  22. data/docs/_sass/custom/custom.scss +60 -0
  23. data/docs/api/index.md +8 -0
  24. data/docs/assets/images/logo_wide.png +0 -0
  25. data/docs/changelog/index.md +8 -0
  26. data/docs/favicon.ico +0 -0
  27. data/docs/getting_started/index.md +8 -0
  28. data/docs/getting_started/installation.md +7 -0
  29. data/docs/getting_started/ruby_support.md +7 -0
  30. data/docs/getting_started/wireframes.md +7 -0
  31. data/docs/index.md +17 -0
  32. data/docs/introduction/basic_usage.md +7 -0
  33. data/docs/introduction/index.md +8 -0
  34. data/docs/introduction/why_amber_component.md +7 -0
  35. data/docs/resources/index.md +8 -0
  36. data/docs/styles/index.md +8 -0
  37. data/docs/styles/usage.md +7 -0
  38. data/docs/views/index.md +8 -0
  39. data/docs/views/usage.md +7 -0
  40. data/icon.png +0 -0
  41. data/lib/amber_component/assets.rb +59 -0
  42. data/lib/amber_component/base.rb +66 -434
  43. data/lib/amber_component/helpers/class_helper.rb +22 -0
  44. data/lib/amber_component/helpers/component_helper.rb +18 -0
  45. data/lib/amber_component/helpers/css_helper.rb +25 -0
  46. data/lib/amber_component/helpers.rb +11 -0
  47. data/lib/amber_component/railtie.rb +21 -0
  48. data/lib/amber_component/rendering.rb +53 -0
  49. data/lib/amber_component/template_handler/erb.rb +17 -0
  50. data/lib/amber_component/template_handler.rb +26 -0
  51. data/lib/amber_component/version.rb +1 -1
  52. data/lib/amber_component/views.rb +198 -0
  53. data/lib/amber_component.rb +6 -2
  54. data/lib/generators/amber_component/install_generator.rb +23 -0
  55. data/lib/generators/amber_component/templates/application_component.rb +13 -0
  56. data/lib/generators/amber_component_generator.rb +24 -0
  57. data/lib/generators/templates/component.rb.erb +9 -0
  58. data/lib/generators/templates/component_test.rb.erb +9 -0
  59. data/lib/generators/templates/style.css.erb +3 -0
  60. data/lib/generators/templates/view.html.erb +3 -0
  61. metadata +85 -19
  62. data/.kanbn/index.md +0 -23
  63. data/.kanbn/tasks/add-instance-variables-to-view-when-block-given-markdown.md +0 -9
  64. data/.kanbn/tasks/bind-clas-to-action-view-method-call-example-component-data-data-without-calling-any-method.md +0 -9
  65. data/.kanbn/tasks/bind-scoped-css-to-head-of-doc.md +0 -10
  66. data/.kanbn/tasks/check-if-we-need-full-rails-gem-pack.md +0 -9
  67. data/.kanbn/tasks/simple-proto.md +0 -10
  68. data/.kanbn/tasks/verify-if-template-is-haml-or-erb.md +0 -9
  69. data/PLANS.md +0 -17
  70. data/lib/amber_component/helper.rb +0 -8
  71. data/lib/amber_component/style_injector.rb +0 -52
  72. data/sig/amber_components.rbs +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 867893765c3c9d6132ea68c2f977b931a232b9e50200a49a8c450efed151fb2d
4
- data.tar.gz: 2a94d57db993a110535648678721fa27b8c896baee1963546705bb5752c57325
3
+ metadata.gz: 239144479c990df66cda6d83bd062bdcfd0b0affca32597ebd968d490f6817d8
4
+ data.tar.gz: 8d8cc882bceabcbff1cf16d0b5881274f55068a30b91acac98c2e108be248c0c
5
5
  SHA512:
6
- metadata.gz: f05bb2a4895ed3ae859101fe3dad8d89f4f2b03c52e323354586b789f0bbe9461f3f992dea8c5ab5d119828d444e84d8ef00ac5a78ed1d8ba672469b3812f6d8
7
- data.tar.gz: 28dd41d02e58592d7edcc8286b7cab5be3712548e9277912ef20742e146956caee7040f7d6665c241e2164be4d12bcef6dd04ade0befc11f1e45ccfc165316ea
6
+ metadata.gz: f06b5e9288c557ae52015f637111ae6a6b90f0402a72b63873cdc1c3aae14d114c921bec304dda68b6ffddc4e4cc98e27d8cac28d84ec2758eb6da1d4176db28
7
+ data.tar.gz: 8d950dcb6102a235f38078511705799a38956f94df12f8e5677f5d038c5adc598cf275ef2266c00f1ccfe9a54666793248afb076b982ea6858300692ce817776
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.6
2
+ TargetRubyVersion: 2.7
3
3
  SuggestExtensions: false
4
4
  EnabledByDefault: true
5
5
  Exclude:
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ amber_component
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-3.1.0
1
+ 3.1.2
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,87 @@
1
+ <img src="banner.png" width="500px" style="margin-bottom: 2rem;"/>
2
+
3
+ # Contributing
4
+
5
+ ### Setup
6
+
7
+ To setup this gem for development you should use the setup script.
8
+
9
+ ```sh
10
+ $ bin/setup
11
+ ```
12
+
13
+ ### Console
14
+
15
+ You can access an IRB with this entire gem preloaded like this
16
+
17
+ ```sh
18
+ $ bin/console
19
+ ```
20
+
21
+ ### Tests
22
+
23
+ You can run all tests with:
24
+
25
+ ```sh
26
+ $ rake test
27
+ ```
28
+
29
+ All unit tests:
30
+
31
+ ```sh
32
+ $ rake test:unit
33
+ ```
34
+
35
+ All integration tests:
36
+
37
+ ```sh
38
+ $ rake test:integration
39
+ ```
40
+
41
+ ### Release
42
+
43
+ To release a new version, update the version number in `version.rb`, and then run
44
+
45
+ ```sh
46
+ $ bundle exec rake release
47
+ ```
48
+
49
+ This will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
50
+
51
+ ### Local installation
52
+
53
+ To install this gem onto your local machine, run
54
+
55
+ ```sh
56
+ $ bundle exec rake install
57
+ ```
58
+
59
+ ### Problems with bundling
60
+
61
+ > An error occurred while installing ffi (1.15.5), and Bundler cannot continue.
62
+ >
63
+ > In Gemfile:
64
+ > sassc was resolved to 2.4.0, which depends on
65
+ > ffi
66
+
67
+ ```sh
68
+ $ gem install ffi -- --with-cflags="-fdeclspec"
69
+ ```
70
+
71
+ **puma**
72
+
73
+ > Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
74
+ >
75
+ > current directory: /Users/mateuszdrewniak/.rvm/gems/ruby-3.1.0@dupa/gems/puma-5.6.2/ext/puma_http11
76
+ >
77
+ > /Users/mateuszdrewniak/.rvm/rubies/ruby-3.1.0/bin/ruby -I /Users/mateuszdrewniak/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0 -r ./siteconf20220219-40641-4uxhq6.rb extconf.rb --with-cflags\=-Wno-error\=implicit-function-declaration
78
+ >
79
+ > checking for BIO_read() in -lcrypto... *** extconf.rb failed ***
80
+ >
81
+ > Could not create Makefile due to some reason, probably lack of necessary
82
+ > libraries and/or headers. Check the mkmf.log file for more details. You may
83
+ > need configuration options.
84
+
85
+ ```sh
86
+ $ gem install puma -- --with-cflags="-fdeclspec"
87
+ ```
data/Gemfile CHANGED
@@ -17,6 +17,9 @@ gem 'solargraph', '~> 0.45.0'
17
17
  gem 'yard'
18
18
 
19
19
  # Testing dependencies
20
+ gem 'bundler-audit'
20
21
  gem 'minitest', '~> 5.0'
22
+ gem 'railties'
21
23
  gem 'shoulda-context', '~> 2.0'
22
24
  gem 'simplecov', require: false
25
+ gem 'simplecov-cobertura', require: false
data/Gemfile.lock CHANGED
@@ -1,39 +1,16 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- amber_component (0.0.2)
4
+ amber_component (0.0.3)
5
+ actionview (>= 6)
6
+ activemodel (>= 6)
7
+ activesupport (>= 6)
5
8
  memery (>= 1.4.1)
6
- rails (>= 6)
7
9
  tilt (>= 2.0.10)
8
10
 
9
11
  GEM
10
12
  remote: https://rubygems.org/
11
13
  specs:
12
- actioncable (7.0.3.1)
13
- actionpack (= 7.0.3.1)
14
- activesupport (= 7.0.3.1)
15
- nio4r (~> 2.0)
16
- websocket-driver (>= 0.6.1)
17
- actionmailbox (7.0.3.1)
18
- actionpack (= 7.0.3.1)
19
- activejob (= 7.0.3.1)
20
- activerecord (= 7.0.3.1)
21
- activestorage (= 7.0.3.1)
22
- activesupport (= 7.0.3.1)
23
- mail (>= 2.7.1)
24
- net-imap
25
- net-pop
26
- net-smtp
27
- actionmailer (7.0.3.1)
28
- actionpack (= 7.0.3.1)
29
- actionview (= 7.0.3.1)
30
- activejob (= 7.0.3.1)
31
- activesupport (= 7.0.3.1)
32
- mail (~> 2.5, >= 2.5.4)
33
- net-imap
34
- net-pop
35
- net-smtp
36
- rails-dom-testing (~> 2.0)
37
14
  actionpack (7.0.3.1)
38
15
  actionview (= 7.0.3.1)
39
16
  activesupport (= 7.0.3.1)
@@ -41,34 +18,14 @@ GEM
41
18
  rack-test (>= 0.6.3)
42
19
  rails-dom-testing (~> 2.0)
43
20
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
44
- actiontext (7.0.3.1)
45
- actionpack (= 7.0.3.1)
46
- activerecord (= 7.0.3.1)
47
- activestorage (= 7.0.3.1)
48
- activesupport (= 7.0.3.1)
49
- globalid (>= 0.6.0)
50
- nokogiri (>= 1.8.5)
51
21
  actionview (7.0.3.1)
52
22
  activesupport (= 7.0.3.1)
53
23
  builder (~> 3.1)
54
24
  erubi (~> 1.4)
55
25
  rails-dom-testing (~> 2.0)
56
26
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
57
- activejob (7.0.3.1)
58
- activesupport (= 7.0.3.1)
59
- globalid (>= 0.3.6)
60
27
  activemodel (7.0.3.1)
61
28
  activesupport (= 7.0.3.1)
62
- activerecord (7.0.3.1)
63
- activemodel (= 7.0.3.1)
64
- activesupport (= 7.0.3.1)
65
- activestorage (7.0.3.1)
66
- actionpack (= 7.0.3.1)
67
- activejob (= 7.0.3.1)
68
- activerecord (= 7.0.3.1)
69
- activesupport (= 7.0.3.1)
70
- marcel (~> 1.0)
71
- mini_mime (>= 1.1.0)
72
29
  activesupport (7.0.3.1)
73
30
  concurrent-ruby (~> 1.0, >= 1.0.2)
74
31
  i18n (>= 1.6, < 2)
@@ -78,19 +35,19 @@ GEM
78
35
  backport (1.2.0)
79
36
  benchmark (0.2.0)
80
37
  builder (3.2.4)
38
+ bundler-audit (0.9.1)
39
+ bundler (>= 1.2.0, < 3)
40
+ thor (~> 1.0)
81
41
  byebug (11.1.3)
82
42
  concurrent-ruby (1.1.10)
83
43
  crass (1.0.6)
84
44
  diff-lcs (1.5.0)
85
- digest (3.1.0)
86
45
  docile (1.4.0)
87
46
  e2mmap (0.1.0)
88
47
  erubi (1.10.0)
89
48
  ffi (1.15.5)
90
49
  git (1.11.0)
91
50
  rchardet (~> 1.8)
92
- globalid (1.0.0)
93
- activesupport (>= 5.0)
94
51
  haml (5.2.2)
95
52
  temple (>= 0.8.0)
96
53
  tilt
@@ -105,34 +62,15 @@ GEM
105
62
  loofah (2.18.0)
106
63
  crass (~> 1.0.2)
107
64
  nokogiri (>= 1.5.9)
108
- mail (2.7.1)
109
- mini_mime (>= 0.1.1)
110
- marcel (1.0.2)
111
65
  memery (1.4.1)
112
66
  ruby2_keywords (~> 0.0.2)
113
67
  method_source (1.0.0)
114
- mini_mime (1.1.2)
115
68
  mini_portile2 (2.8.0)
116
69
  minitest (5.16.2)
117
- net-imap (0.2.3)
118
- digest
119
- net-protocol
120
- strscan
121
- net-pop (0.1.1)
122
- digest
123
- net-protocol
124
- timeout
125
- net-protocol (0.1.3)
126
- timeout
127
- net-smtp (0.3.1)
128
- digest
129
- net-protocol
130
- timeout
131
- nio4r (2.5.8)
132
- nokogiri (1.13.7)
70
+ nokogiri (1.13.8)
133
71
  mini_portile2 (~> 2.8.0)
134
72
  racc (~> 1.4)
135
- nokogiri (1.13.7-arm64-darwin)
73
+ nokogiri (1.13.8-arm64-darwin)
136
74
  racc (~> 1.4)
137
75
  parallel (1.22.1)
138
76
  parser (3.1.2.0)
@@ -141,20 +79,6 @@ GEM
141
79
  rack (2.2.4)
142
80
  rack-test (2.0.2)
143
81
  rack (>= 1.3)
144
- rails (7.0.3.1)
145
- actioncable (= 7.0.3.1)
146
- actionmailbox (= 7.0.3.1)
147
- actionmailer (= 7.0.3.1)
148
- actionpack (= 7.0.3.1)
149
- actiontext (= 7.0.3.1)
150
- actionview (= 7.0.3.1)
151
- activejob (= 7.0.3.1)
152
- activemodel (= 7.0.3.1)
153
- activerecord (= 7.0.3.1)
154
- activestorage (= 7.0.3.1)
155
- activesupport (= 7.0.3.1)
156
- bundler (>= 1.15.0)
157
- railties (= 7.0.3.1)
158
82
  rails-dom-testing (2.0.3)
159
83
  activesupport (>= 4.2.0)
160
84
  nokogiri (>= 1.6)
@@ -195,6 +119,9 @@ GEM
195
119
  docile (~> 1.1)
196
120
  simplecov-html (~> 0.11)
197
121
  simplecov_json_formatter (~> 0.1)
122
+ simplecov-cobertura (2.1.0)
123
+ rexml
124
+ simplecov (~> 0.19)
198
125
  simplecov-html (0.12.3)
199
126
  simplecov_json_formatter (0.1.4)
200
127
  solargraph (0.45.0)
@@ -212,18 +139,13 @@ GEM
212
139
  thor (~> 1.0)
213
140
  tilt (~> 2.0)
214
141
  yard (~> 0.9, >= 0.9.24)
215
- strscan (3.0.4)
216
142
  temple (0.8.2)
217
143
  thor (1.2.1)
218
- tilt (2.0.10)
219
- timeout (0.3.0)
144
+ tilt (2.0.11)
220
145
  tzinfo (2.0.5)
221
146
  concurrent-ruby (~> 1.0)
222
147
  unicode-display_width (2.2.0)
223
148
  webrick (1.7.0)
224
- websocket-driver (0.7.5)
225
- websocket-extensions (>= 0.1.0)
226
- websocket-extensions (0.1.5)
227
149
  yard (0.9.28)
228
150
  webrick (~> 1.7.0)
229
151
  zeitwerk (2.6.0)
@@ -234,15 +156,18 @@ PLATFORMS
234
156
 
235
157
  DEPENDENCIES
236
158
  amber_component!
159
+ bundler-audit
237
160
  byebug
238
161
  git
239
162
  haml
240
163
  minitest (~> 5.0)
164
+ railties
241
165
  rake (~> 13.0)
242
166
  rubocop (~> 1.21)
243
167
  sassc
244
168
  shoulda-context (~> 2.0)
245
169
  simplecov
170
+ simplecov-cobertura
246
171
  solargraph (~> 0.45.0)
247
172
  yard
248
173
 
data/README.md CHANGED
@@ -1,63 +1,46 @@
1
- # AmberComponents
1
+ [![license](https://img.shields.io/badge/License-MIT-purple.svg)](LICENSE)
2
+ [![Gem Version](https://img.shields.io/gem/v/amber_component.svg?style=flat)](https://rubygems.org/gems/amber_component)
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/ad84af499e9791933a87/maintainability)](https://codeclimate.com/github/amber-ruby/amber_component/maintainability)
4
+ [![CI badge](https://github.com/amber-ruby/amber_component/actions/workflows/ci_ruby.yml/badge.svg)](https://github.com/amber-ruby/amber_component/actions/workflows/ci_ruby.yml)
5
+ [![Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Verseth/6a095c79278b074d79feaa4f8ceeb2a8/raw/amber_component__heads_main.json)](https://github.com/amber-ruby/amber_component/actions/workflows/ci_ruby.yml)
6
+ [![Downloads](https://ruby-gem-downloads-badge.herokuapp.com/amber_component)]((https://rubygems.org/gems/amber_component))
2
7
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/amber_components`. To experiment with that code, run `bin/console` for an interactive prompt.
8
+ <img src="banner.png" width="500px" style="margin-bottom: 2rem;"/>
4
9
 
5
- TODO: Delete this and the text above, and describe your gem
10
+ # AmberComponent
11
+
12
+ AmberComponent is a simple component library which seamlessly hooks into your Rails project and allows you to create simple backend components. They work like mini controllers which are bound with their view.
13
+
14
+ Created by [Garbus Beach](https://github.com/garbusbeach) and [Mateusz Drewniak](https://github.com/Verseth).
15
+
16
+ ## Getting started
17
+
18
+ You can read a lot more about AmberComponent in its [official docs](https://ambercomponent.com).
6
19
 
7
20
  ## Installation
8
21
 
9
22
  Install the gem and add to the application's Gemfile by executing:
10
23
 
11
- $ bundle add amber_components
24
+ $ bundle add amber_component
12
25
 
13
26
  If bundler is not being used to manage dependencies, install the gem by executing:
14
27
 
15
- $ gem install amber_components
28
+ $ gem install amber_component
16
29
 
17
30
  ## Usage
18
31
 
19
- TODO: Write usage instructions here
20
-
21
- ## Development
32
+ If you're using a Rails application there's an installation generator that you should run:
22
33
 
23
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
34
+ ```sh
35
+ $ rails generate amber_component:install
36
+ ```
24
37
 
25
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
38
+ ## Contribute
26
39
 
27
- ## Contributing
40
+ Do you want to contribute to AmberComponent? Open the issues page and check for the help wanted label! But before you start coding, please read our [Contributing Guide](https://github.com/amber-ruby/amber_component/blob/main/CONTRIBUTING.md).
28
41
 
29
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/amber_components.
42
+ Bug reports and pull requests are welcome on GitHub at https://github.com/amber-ruby/amber_component.
30
43
 
31
44
  ## License
32
45
 
33
46
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
34
-
35
- ## Problems
36
-
37
- > An error occurred while installing ffi (1.15.5), and Bundler cannot continue.
38
- >
39
- > In Gemfile:
40
- > sassc was resolved to 2.4.0, which depends on
41
- > ffi
42
-
43
- ```sh
44
- $ gem install ffi -- --with-cflags="-fdeclspec"
45
- ```
46
-
47
- **puma**
48
-
49
- > Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
50
- >
51
- > current directory: /Users/mateuszdrewniak/.rvm/gems/ruby-3.1.0@dupa/gems/puma-5.6.2/ext/puma_http11
52
- >
53
- > /Users/mateuszdrewniak/.rvm/rubies/ruby-3.1.0/bin/ruby -I /Users/mateuszdrewniak/.rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0 -r ./siteconf20220219-40641-4uxhq6.rb extconf.rb --with-cflags\=-Wno-error\=implicit-function-declaration
54
- >
55
- > checking for BIO_read() in -lcrypto... *** extconf.rb failed ***
56
- >
57
- > Could not create Makefile due to some reason, probably lack of necessary
58
- > libraries and/or headers. Check the mkmf.log file for more details. You may
59
- > need configuration options.
60
-
61
- ```sh
62
- $ gem install puma -- --with-cflags="-fdeclspec"
63
- ```
data/Rakefile CHANGED
@@ -8,7 +8,23 @@ require 'rake/testtask'
8
8
  t.libs << 'test'
9
9
  t.libs << 'test/fixtures'
10
10
  # ignore tests of rails apps
11
- t.test_files = ::FileList['test/**/*_test.rb'] - ::FileList['test/apps/**/*_test.rb']
11
+ t.test_files = ::FileList['test/**/*_test.rb'] - ::FileList['test/dummy/**/*_test.rb']
12
+ end
13
+
14
+ ::Rake::TestTask.new('test:unit') do |t|
15
+ t.libs << 'lib'
16
+ t.libs << 'test'
17
+ t.libs << 'test/fixtures'
18
+ # ignore tests of rails apps
19
+ t.test_files = ::FileList['test/unit/**/*_test.rb']
20
+ end
21
+
22
+ ::Rake::TestTask.new('test:integration') do |t|
23
+ t.libs << 'lib'
24
+ t.libs << 'test'
25
+ t.libs << 'test/fixtures'
26
+ # ignore tests of rails apps
27
+ t.test_files = ::FileList['test/integration/**/*_test.rb']
12
28
  end
13
29
 
14
30
  require 'rubocop/rake_task'
@@ -17,7 +17,7 @@ require_relative "lib/amber_component/version"
17
17
  DESC
18
18
  spec.homepage = 'https://github.com/amber-ruby/amber_component'
19
19
  spec.license = 'MIT'
20
- spec.required_ruby_version = ">= 2.6.0"
20
+ spec.required_ruby_version = ">= 2.7.0"
21
21
 
22
22
  # spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
23
23
 
@@ -38,8 +38,10 @@ require_relative "lib/amber_component/version"
38
38
  spec.require_paths = ["lib"]
39
39
 
40
40
  # Uncomment to register a new dependency of your gem
41
+ spec.add_dependency "actionview", ">= 6"
42
+ spec.add_dependency "activemodel", ">= 6"
43
+ spec.add_dependency "activesupport", ">= 6"
41
44
  spec.add_dependency "memery", ">= 1.4.1"
42
- spec.add_dependency "rails", ">= 6"
43
45
  spec.add_dependency "tilt", ">= 2.0.10"
44
46
 
45
47
  # For more information and examples about making a new gem, check out our
data/banner.png ADDED
Binary file
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_BUILD__EVENTMACHINE: "--with-cppflags=-I/opt/homebrew/opt/openssl@3/include"
data/docs/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ _site/
2
+ .sass-cache
3
+ .jekyll-cache
4
+ .jekyll-metadata
5
+ vendor
data/docs/404.html ADDED
@@ -0,0 +1,25 @@
1
+ ---
2
+ permalink: /404.html
3
+ layout: default
4
+ ---
5
+
6
+ <style type="text/css" media="screen">
7
+ .container {
8
+ margin: 10px auto;
9
+ max-width: 600px;
10
+ text-align: center;
11
+ }
12
+ h1 {
13
+ margin: 30px 0;
14
+ font-size: 4em;
15
+ line-height: 1;
16
+ letter-spacing: -1px;
17
+ }
18
+ </style>
19
+
20
+ <div class="container">
21
+ <h1>404</h1>
22
+
23
+ <p><strong>Page not found :(</strong></p>
24
+ <p>The requested page could not be found.</p>
25
+ </div>
data/docs/Gemfile ADDED
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+ # Hello! This is where you manage which Jekyll version is used to run.
5
+ # When you want to use a different version, change it below, save the
6
+ # file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
7
+ #
8
+ # bundle exec jekyll serve
9
+ #
10
+ # This will help ensure the proper Jekyll version is running.
11
+ # Happy Jekylling!
12
+ gem 'jekyll', '~> 4.2.2'
13
+ gem 'just-the-docs' # Theme for Jekyll docs.
14
+ gem 'webrick'
15
+ # This is the default theme for new Jekyll sites. You may change this to anything you like.
16
+ gem 'minima', '~> 2.5'
17
+ # If you want to use GitHub Pages, remove the "gem "jekyll"" above and
18
+ # uncomment the line below. To upgrade, run `bundle update github-pages`.
19
+ # gem "github-pages", group: :jekyll_plugins
20
+ # If you have any plugins, put them here!
21
+ group :jekyll_plugins do
22
+ gem 'jekyll-feed', '~> 0.12'
23
+ end
24
+
25
+ # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
26
+ # and associated library.
27
+ platforms :mingw, :x64_mingw, :mswin, :jruby do
28
+ gem 'tzinfo', '~> 1.2'
29
+ gem 'tzinfo-data'
30
+ end
31
+
32
+ # Performance-booster for watching directories on Windows
33
+ gem 'wdm', '~> 0.1.1', platforms: %i[mingw x64_mingw mswin]
34
+
35
+ # Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
36
+ # do not have a Java counterpart.
37
+ gem 'http_parser.rb', '~> 0.6.0', platforms: [:jruby]
data/docs/Gemfile.lock ADDED
@@ -0,0 +1,89 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ addressable (2.8.0)
5
+ public_suffix (>= 2.0.2, < 5.0)
6
+ colorator (1.1.0)
7
+ concurrent-ruby (1.1.10)
8
+ em-websocket (0.5.3)
9
+ eventmachine (>= 0.12.9)
10
+ http_parser.rb (~> 0)
11
+ eventmachine (1.2.7)
12
+ ffi (1.15.5)
13
+ forwardable-extended (2.6.0)
14
+ http_parser.rb (0.8.0)
15
+ i18n (1.12.0)
16
+ concurrent-ruby (~> 1.0)
17
+ jekyll (4.2.2)
18
+ addressable (~> 2.4)
19
+ colorator (~> 1.0)
20
+ em-websocket (~> 0.5)
21
+ i18n (~> 1.0)
22
+ jekyll-sass-converter (~> 2.0)
23
+ jekyll-watch (~> 2.0)
24
+ kramdown (~> 2.3)
25
+ kramdown-parser-gfm (~> 1.0)
26
+ liquid (~> 4.0)
27
+ mercenary (~> 0.4.0)
28
+ pathutil (~> 0.9)
29
+ rouge (~> 3.0)
30
+ safe_yaml (~> 1.0)
31
+ terminal-table (~> 2.0)
32
+ jekyll-feed (0.16.0)
33
+ jekyll (>= 3.7, < 5.0)
34
+ jekyll-sass-converter (2.2.0)
35
+ sassc (> 2.0.1, < 3.0)
36
+ jekyll-seo-tag (2.8.0)
37
+ jekyll (>= 3.8, < 5.0)
38
+ jekyll-watch (2.2.1)
39
+ listen (~> 3.0)
40
+ just-the-docs (0.3.3)
41
+ jekyll (>= 3.8.5)
42
+ jekyll-seo-tag (~> 2.0)
43
+ rake (>= 12.3.1, < 13.1.0)
44
+ kramdown (2.4.0)
45
+ rexml
46
+ kramdown-parser-gfm (1.1.0)
47
+ kramdown (~> 2.0)
48
+ liquid (4.0.3)
49
+ listen (3.7.1)
50
+ rb-fsevent (~> 0.10, >= 0.10.3)
51
+ rb-inotify (~> 0.9, >= 0.9.10)
52
+ mercenary (0.4.0)
53
+ minima (2.5.1)
54
+ jekyll (>= 3.5, < 5.0)
55
+ jekyll-feed (~> 0.9)
56
+ jekyll-seo-tag (~> 2.1)
57
+ pathutil (0.16.2)
58
+ forwardable-extended (~> 2.6)
59
+ public_suffix (4.0.7)
60
+ rake (13.0.6)
61
+ rb-fsevent (0.11.1)
62
+ rb-inotify (0.10.1)
63
+ ffi (~> 1.0)
64
+ rexml (3.2.5)
65
+ rouge (3.29.0)
66
+ safe_yaml (1.0.5)
67
+ sassc (2.4.0)
68
+ ffi (~> 1.9)
69
+ terminal-table (2.0.0)
70
+ unicode-display_width (~> 1.1, >= 1.1.1)
71
+ unicode-display_width (1.8.0)
72
+ webrick (1.7.0)
73
+
74
+ PLATFORMS
75
+ ruby
76
+
77
+ DEPENDENCIES
78
+ http_parser.rb (~> 0.6.0)
79
+ jekyll (~> 4.2.2)
80
+ jekyll-feed (~> 0.12)
81
+ just-the-docs
82
+ minima (~> 2.5)
83
+ tzinfo (~> 1.2)
84
+ tzinfo-data
85
+ wdm (~> 0.1.1)
86
+ webrick
87
+
88
+ BUNDLED WITH
89
+ 2.3.14
data/docs/README.md ADDED
@@ -0,0 +1,19 @@
1
+ ![Amber Components](../banner.png "Amber Components")
2
+
3
+ # Docs
4
+
5
+ > Based on jekyll gem [https://jekyllrb.com/](https://jekyllrb.com/)
6
+
7
+ ## install
8
+
9
+ 1. `bundle install`
10
+
11
+ ## run:development
12
+
13
+ 1. `jekyll serve`
14
+ 2. `http://127.0.0.1:4000/`
15
+
16
+ ## build for production
17
+
18
+ 1. `jekyll build`
19
+ 2. `check`