us_web_design_standards_ror 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +8 -13
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/console +14 -0
- data/lib/uswds.rb +1 -2
- data/lib/uswds/version.rb +1 -1
- data/setup +8 -0
- metadata +6 -5
- data/lib/generators/uswds/install/install_generator.rb +0 -32
- data/lib/uswds/engine.rb +0 -10
- data/lib/uswds/rails/engine.rb +0 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: abfc2ce42561a2d9340d492ed5764c61d27c5ea1
|
|
4
|
+
data.tar.gz: bca94761c7b871df638a8b6393881f42e47ae924
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2d8a9a58ba00521d09a9ae9542450e060a84afc442c6569692ecddafc75e1aaf3b2b5dc7190423ce97b5795636c9fc53b0b8cff73402a510d893a4d9cff46f2a
|
|
7
|
+
data.tar.gz: bc79167766595e6b39da4317d1701c476686d828e86222aef4d76c85180818f90c762405d7e5ad52ff54d2603be126ef9c69d66bf2287522f5e0c1a0786121bb
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -7,28 +7,22 @@ Hey, internet! I bundled the [US Web Design Standards](https://standards.usa.gov
|
|
|
7
7
|
Add to your application's Gemfile:
|
|
8
8
|
|
|
9
9
|
```ruby
|
|
10
|
-
gem 'us_web_design_standards_ror'
|
|
10
|
+
gem 'us_web_design_standards_ror', '0.2.3'
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
then run `bundle` in the console, and then
|
|
13
|
+
then run `bundle` in the console, and then add the following to /app/assets/stylesheets/application.css:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
rails g uswds:install
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
command. This should add:
|
|
20
|
-
|
|
21
|
-
```ruby
|
|
22
16
|
*= require uswds
|
|
23
17
|
```
|
|
24
18
|
|
|
25
|
-
|
|
19
|
+
and add the following to /app/assets/javascripts/application.js:
|
|
26
20
|
|
|
27
|
-
```
|
|
21
|
+
```bash
|
|
28
22
|
//= require uswds
|
|
29
23
|
```
|
|
30
24
|
|
|
31
|
-
|
|
25
|
+
From there, you should be good with the CSS and JS of the U.S. Web Design Standards. Integration of the bundled fonts and images is coming in a future release.
|
|
32
26
|
|
|
33
27
|
## Usage
|
|
34
28
|
|
|
@@ -44,7 +38,8 @@ The gem is available as open source under the terms of the [MIT License](http://
|
|
|
44
38
|
|
|
45
39
|
## To-Do
|
|
46
40
|
|
|
47
|
-
|
|
48
|
-
- [
|
|
41
|
+
~~- [X] Create installer to inject CSS/JS into asset pipeline~~
|
|
42
|
+
- [X] Make stable way to include USWDS CSS/JS into asset pipeline
|
|
43
|
+
- [ ] Create stable way to inject fonts/images into asset pipeline
|
|
49
44
|
- [ ] Create demo page to show implementations of various USWDS features in production
|
|
50
45
|
- [ ] Clean up code so that this doesn't LOOK like my first gem
|
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "uswds"
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
# require "pry"
|
|
11
|
+
# Pry.start
|
|
12
|
+
|
|
13
|
+
require "irb"
|
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "uswds"
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
# require "pry"
|
|
11
|
+
# Pry.start
|
|
12
|
+
|
|
13
|
+
require "irb"
|
|
14
|
+
IRB.start
|
data/lib/uswds.rb
CHANGED
data/lib/uswds/version.rb
CHANGED
data/setup
ADDED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: us_web_design_standards_ror
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Henry Quinn
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-12-
|
|
11
|
+
date: 2016-12-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -54,11 +54,12 @@ files:
|
|
|
54
54
|
- LICENSE.txt
|
|
55
55
|
- README.md
|
|
56
56
|
- Rakefile
|
|
57
|
-
-
|
|
57
|
+
- bin/console
|
|
58
|
+
- bin/setup
|
|
59
|
+
- console
|
|
58
60
|
- lib/uswds.rb
|
|
59
|
-
- lib/uswds/engine.rb
|
|
60
|
-
- lib/uswds/rails/engine.rb
|
|
61
61
|
- lib/uswds/version.rb
|
|
62
|
+
- setup
|
|
62
63
|
- uswds.gemspec
|
|
63
64
|
- vendor/assets/fonts/merriweather-bold-webfont.eot
|
|
64
65
|
- vendor/assets/fonts/merriweather-bold-webfont.ttf
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
require 'rails/generators'
|
|
2
|
-
require 'rails'
|
|
3
|
-
|
|
4
|
-
module Uswds
|
|
5
|
-
module Generators
|
|
6
|
-
class InstallGenerator < Rails::Generators::Base
|
|
7
|
-
|
|
8
|
-
desc "This generator installs USWDS framework to Asset Pipeline"
|
|
9
|
-
def add_assets
|
|
10
|
-
js_inject = "//= require uswds\n"
|
|
11
|
-
app_js = File.join(Rails.root, 'app', 'assets', 'javascripts', 'application.js')
|
|
12
|
-
css_inject = "*= require uswds\n"
|
|
13
|
-
app_scss = File.join(Rails.root, 'app', 'assets', 'stylesheets', 'application.scss')
|
|
14
|
-
app_css = File.join(Rails.root, 'app', 'assets', 'stylesheets', 'application.css')
|
|
15
|
-
|
|
16
|
-
if File.exist?(app_js)
|
|
17
|
-
insert_into_file app_js, js_inject, :after => "require_tree .\n"
|
|
18
|
-
else
|
|
19
|
-
say_status('','Nor application.js could not be found!')
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
if File.exist?(app_scss)
|
|
23
|
-
insert_into_file app_scss, css_inject, :after => "require_self\n"
|
|
24
|
-
elsif File.exist?(app_css)
|
|
25
|
-
insert_into_file app_css, css_inject, :after => "require_self\n"
|
|
26
|
-
else
|
|
27
|
-
say_status('','Nor application.css/application.scss could not be found!')
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
data/lib/uswds/engine.rb
DELETED
data/lib/uswds/rails/engine.rb
DELETED