barnardos-ruby_design_system 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47b4f37ec6e6bc859ec221278a4559f4cb7932b9e4fa0f6645440bf266ea8f52
|
4
|
+
data.tar.gz: ab1bc3b3ccf5257337c2514bbbc703c6196ffbbd4fd450ce94b4deb760536dc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc37330b0619f259a98642c93a13fe1024a6541a79575bb78fff22e5abeeb098d788e367dd5f118b054caffdd58c5169ef625f717744b793c9291af5d688dd59
|
7
|
+
data.tar.gz: ed9032cc2fba5fd68f533f903e2ed3b8fe2e2b62b5dc947ce5c604aa022a18d97f837fa7e5276efc60f9083e467d116809b2b499eeb8153092760f4088f46904
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Tools for applying Barnardo's Design System to Ruby projects.
|
4
4
|
|
5
|
-
The tools include helper methods and
|
5
|
+
The tools include helper methods and modifications to simple_form to make it Design System compliant.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -16,7 +16,7 @@ And then execute:
|
|
16
16
|
|
17
17
|
$ bundle
|
18
18
|
|
19
|
-
With the gem
|
19
|
+
With the gem installed, a Rails generator is added that will set up the host app. To run the generator
|
20
20
|
execute the following at app root:
|
21
21
|
|
22
22
|
$ rails g barnardos:install
|
@@ -39,29 +39,17 @@ The file `package.json` is updated to include declarations for PostCSS and relat
|
|
39
39
|
|
40
40
|
The PostCSS configuration file `/postcss.config.js` is copied to root
|
41
41
|
|
42
|
-
#### Updates `/app/views/layouts/application.html.erb`
|
43
|
-
|
44
|
-
All CSS should be defined within the folder `app/javascript` so the `stylesheet_link_tag` declaration can be removed
|
45
|
-
from the application template. Also make sure that JavaScript is loaded here with `javascript_pack_tag`. For example:
|
46
|
-
|
47
|
-
```
|
48
|
-
<%= javascript_pack_tag 'application' %>
|
49
|
-
```
|
50
|
-
|
51
42
|
### Sets up simple form to work with the design system
|
52
43
|
|
53
44
|
A set of classes are inserted into `app/inputs`. These modify the rails input classes so that when used
|
54
45
|
with simple_form, they create components that match the design system.
|
55
46
|
|
56
|
-
|
57
|
-
|
58
|
-
### `app/helpers/application_helper.rb`
|
47
|
+
### Adds `app/helpers/barnardos_design_system_helper.rb`
|
59
48
|
|
60
|
-
|
49
|
+
This helper contains the statement `include Barnardos::RubyDesignSystem::ComponentHelper` which makes the helper
|
50
|
+
method defined in this gem, available to the views in the host app.
|
61
51
|
|
62
|
-
|
63
|
-
include Barnardos::RubyDesignSystem::ComponentHelper
|
64
|
-
```
|
52
|
+
## Using the components
|
65
53
|
|
66
54
|
### `/app/javascript/packs/application.js`
|
67
55
|
|
@@ -87,9 +75,12 @@ placing them in alphabetical order is a good idea as it makes them a little easi
|
|
87
75
|
|
88
76
|
## Development
|
89
77
|
|
90
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
|
78
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
|
79
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
91
80
|
|
92
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the
|
81
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the
|
82
|
+
version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version,
|
83
|
+
push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
93
84
|
|
94
85
|
## Contributing
|
95
86
|
|
@@ -22,14 +22,11 @@ module Barnardos
|
|
22
22
|
|
23
23
|
def install
|
24
24
|
directory 'inputs', 'app/inputs'
|
25
|
+
directory 'helpers', 'app/helpers'
|
25
26
|
|
26
27
|
`yarn add #{PACKAGES.join(' ')}`
|
27
28
|
`yarn add #{DEV_PACKAGES.join(' ')} --dev`
|
28
29
|
copy_file 'postcss.config.js', 'postcss.config.js'
|
29
|
-
if File.exist?('app/views/layouts/application.html.erb')
|
30
|
-
gsub_file('app/views/layouts/application.html.erb',
|
31
|
-
/<%= stylesheet_link_tag[^%]*%>?/, '')
|
32
|
-
end
|
33
30
|
rake 'webpacker:clobber'
|
34
31
|
`yarn`
|
35
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barnardos-ruby_design_system
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Nichols
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-01-
|
13
|
+
date: 2020-01-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: simple_form
|
@@ -201,6 +201,7 @@ files:
|
|
201
201
|
- lib/barnardos/ruby_design_system/version.rb
|
202
202
|
- lib/generators/barnardos/USAGE
|
203
203
|
- lib/generators/barnardos/install_generator.rb
|
204
|
+
- lib/generators/barnardos/templates/helpers/barnardos_design_system_helper.rb
|
204
205
|
- lib/generators/barnardos/templates/inputs/collection_check_boxes_input.rb
|
205
206
|
- lib/generators/barnardos/templates/inputs/collection_select_input.rb
|
206
207
|
- lib/generators/barnardos/templates/inputs/string_input.rb
|