iconmap-rails 0.0.1 → 0.1.0
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/README.md +178 -152
- data/Rakefile +8 -6
- data/lib/iconmap/commands.rb +72 -88
- data/lib/iconmap/engine.rb +23 -34
- data/lib/iconmap/jsdelivr.rb +63 -0
- data/lib/iconmap/map.rb +18 -130
- data/lib/iconmap/npm.rb +62 -86
- data/lib/iconmap/packager.rb +96 -113
- data/lib/iconmap/reloader.rb +12 -12
- data/lib/iconmap/version.rb +3 -1
- data/lib/iconmap-rails.rb +4 -3
- data/lib/install/bin/iconmap +3 -2
- data/lib/install/config/iconmap.rb +2 -1
- data/lib/install/install.rb +13 -11
- data/lib/tasks/iconmap_tasks.rake +7 -5
- metadata +19 -16
- data/app/controllers/iconmap/freshness.rb +0 -5
- data/app/helpers/iconmap/iconmap_tags_helper.rb +0 -37
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5c61ce9e8224c055c3ab34e9be6ded6426502f32239eca9f0f791d97d4c4a9d2
|
|
4
|
+
data.tar.gz: 0f9799bc47f36f340b97dcd77820d28fc90bde120957fff908d169b9863e5554
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 50de00b8417cafea43086a17b47d038b1e044c96360e755fb634aa7003d7a38aef73e2da9b87779699bcc348245a92e4d113ea3505107f66d9471428c497d027
|
|
7
|
+
data.tar.gz: 5f6c2a6aaf8868f6d2d5bcece89943d36a33160a97ba71afe90a05db78099f7d5f72888e7a3e2a71b5991c7df9774572004a446f42b37feb8117c732334fd105
|
data/README.md
CHANGED
|
@@ -1,266 +1,292 @@
|
|
|
1
1
|
# Iconmap for Rails
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Manage SVG icons from npm packages by vendoring them locally and serving them through the Rails asset pipeline.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Iconmap for Rails downloads individual SVG files from npm packages via the [jsdelivr CDN](https://www.jsdelivr.com) and stores them in your Rails application. Icons are referenced by their npm package path and served as static files through Sprockets or Propshaft.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Installation
|
|
8
8
|
|
|
9
9
|
1. Run `./bin/bundle add iconmap-rails`
|
|
10
10
|
2. Run `./bin/rails iconmap:install`
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
This creates:
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
pin "@rails/actiontext", to: "actiontext.esm.js"
|
|
18
|
-
pin "trix"
|
|
19
|
-
```
|
|
14
|
+
- `config/iconmap.rb` — your icon map configuration
|
|
15
|
+
- `vendor/icons/` — where vendored SVG files are stored
|
|
16
|
+
- `bin/iconmap` — CLI for managing icons
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
Tip: the `bin/iconmap` binstub is safe to commit to your app. Run it from the project root (for example `./bin/iconmap pin ...`).
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
## How it works
|
|
24
21
|
|
|
25
|
-
-
|
|
26
|
-
```js
|
|
27
|
-
import React from "/Users/DHH/projects/basecamp/node_modules/react"
|
|
28
|
-
```
|
|
22
|
+
Iconmap uses a simple pin-based system to vendor single SVG files from npm packages.
|
|
29
23
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
1. Pin an icon (examples below). The CLI parses the package name, optional version, and icon path, then:
|
|
25
|
+
- Resolves the package version via the jsdelivr data API when no explicit version is given
|
|
26
|
+
- Downloads the SVG from `https://cdn.jsdelivr.net/npm/<package>@<version>/<path>`
|
|
27
|
+
- Writes the file to `vendor/icons/` using a flat filename derived from the package/path (slashes replaced with `--`)
|
|
28
|
+
- Appends or updates a `pin` line in `config/iconmap.rb` with the resolved version comment
|
|
34
29
|
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
import React from "https://ga.jspm.io/npm:react@17.0.1/index.js"
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Iconmap-rails provides a clean API for mapping "bare module specifiers" like `"react"`
|
|
41
|
-
to 1 of the 3 viable ways of loading ES Module javascript packages.
|
|
30
|
+
2. Serve icons: `vendor/icons/` is added to the Rails asset paths so vendored SVGs are available via the normal Rails asset helpers.
|
|
42
31
|
|
|
43
|
-
|
|
32
|
+
Pin syntax examples (CLI usage shown below):
|
|
44
33
|
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
pin
|
|
34
|
+
```bash
|
|
35
|
+
./bin/iconmap pin @fortawesome/fontawesome-free/svgs/brands/github.svg
|
|
36
|
+
./bin/iconmap pin @fortawesome/fontawesome-free@6.7.0/svgs/brands/github.svg
|
|
37
|
+
./bin/iconmap pin some-package/icons/logo.svg
|
|
48
38
|
```
|
|
49
39
|
|
|
50
|
-
|
|
51
|
-
change it to `import React from "https://ga.jspm.io/npm:react@17.0.2/index.js"`"
|
|
40
|
+
In `config/iconmap.rb` a pin looks like:
|
|
52
41
|
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
// => import React from "https://ga.jspm.io/npm:react@17.0.2/index.js"
|
|
42
|
+
```ruby
|
|
43
|
+
pin '@fortawesome/fontawesome-free/svgs/brands/github.svg' # @6.7.2
|
|
56
44
|
```
|
|
57
45
|
|
|
58
|
-
|
|
46
|
+
The downloaded filename mirrors the pin but with path separators replaced by `--`, for example:
|
|
47
|
+
`@fortawesome--fontawesome-free--svgs--brands--github.svg` in `vendor/icons/`.
|
|
59
48
|
|
|
60
|
-
|
|
49
|
+
Notes:
|
|
50
|
+
- Scoped package names (those starting with `@`) are preserved in the filename and mapping.
|
|
51
|
+
- If jsdelivr fails to resolve a package version the CLI will leave the pin without a version comment and print a helpful error.
|
|
61
52
|
|
|
62
|
-
|
|
53
|
+
## Usage
|
|
63
54
|
|
|
64
|
-
|
|
55
|
+
All commands are run via the `bin/iconmap` binstub that `iconmap:install` creates.
|
|
65
56
|
|
|
66
|
-
|
|
57
|
+
### Pinning icons
|
|
67
58
|
|
|
68
|
-
|
|
69
|
-
# config/iconmap.rb
|
|
70
|
-
pin_all_from 'app/javascript/src', under: 'src', to: 'src'
|
|
71
|
-
```
|
|
59
|
+
Pin a single icon from an npm package:
|
|
72
60
|
|
|
73
|
-
|
|
61
|
+
```bash
|
|
62
|
+
./bin/iconmap pin @fortawesome/fontawesome-free/svgs/brands/github.svg
|
|
63
|
+
```
|
|
74
64
|
|
|
75
|
-
|
|
65
|
+
Pin a specific version:
|
|
76
66
|
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
import { ExampleFunction } from 'src/example_function'
|
|
67
|
+
```bash
|
|
68
|
+
./bin/iconmap pin @fortawesome/fontawesome-free@6.7.0/svgs/brands/github.svg
|
|
80
69
|
```
|
|
81
|
-
Which imports the function from `app/javascript/src/example_function.js`.
|
|
82
|
-
|
|
83
|
-
Note: Sprockets used to serve assets (albeit without filename digests) it couldn't find from the `app/javascripts` folder with logical relative paths, meaning pinning local files wasn't needed. Propshaft doesn't have this fallback, so when you use Propshaft you have to pin your local modules.
|
|
84
70
|
|
|
85
|
-
|
|
71
|
+
Pin multiple icons at once:
|
|
86
72
|
|
|
87
|
-
|
|
73
|
+
```bash
|
|
74
|
+
./bin/iconmap pin \
|
|
75
|
+
@fortawesome/fontawesome-free/svgs/brands/github.svg \
|
|
76
|
+
@fortawesome/fontawesome-free/svgs/solid/heart.svg
|
|
77
|
+
```
|
|
88
78
|
|
|
89
|
-
|
|
79
|
+
After pinning, you will see lines like this in `config/iconmap.rb`:
|
|
90
80
|
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Pinning "object-assign" to vendor/object-assign.js via download from https://ga.jspm.io/npm:object-assign@4.1.1/index.js
|
|
81
|
+
```ruby
|
|
82
|
+
pin '@fortawesome/fontawesome-free/svgs/brands/github.svg' # @6.7.2
|
|
83
|
+
pin '@fortawesome/fontawesome-free/svgs/solid/heart.svg' # @6.7.2
|
|
95
84
|
```
|
|
96
85
|
|
|
97
|
-
|
|
86
|
+
Referencing vendored icons in Rails views:
|
|
98
87
|
|
|
99
88
|
```ruby
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
# use asset_path or image_tag with the vendored filename
|
|
90
|
+
image_tag asset_path('@fortawesome--fontawesome-free--svgs--brands--github.svg')
|
|
102
91
|
```
|
|
103
92
|
|
|
104
|
-
|
|
93
|
+
Because `vendor/icons` is added to the app's asset paths the vendored SVGs are available to `asset_path`, `image_tag`, `stylesheet_link_tag`, etc.
|
|
94
|
+
|
|
95
|
+
Real example — Font Awesome GitHub brand icon
|
|
105
96
|
|
|
106
|
-
|
|
97
|
+
1. Pin the latest Font Awesome GitHub brand SVG:
|
|
107
98
|
|
|
108
99
|
```bash
|
|
109
|
-
./bin/iconmap
|
|
110
|
-
Unpinning and removing "react"
|
|
111
|
-
Unpinning and removing "object-assign"
|
|
100
|
+
./bin/iconmap pin @fortawesome/fontawesome-free/svgs/brands/github.svg
|
|
112
101
|
```
|
|
113
102
|
|
|
114
|
-
|
|
103
|
+
2. Or pin a specific version (example uses 6.7.0):
|
|
115
104
|
|
|
116
|
-
|
|
105
|
+
```bash
|
|
106
|
+
./bin/iconmap pin @fortawesome/fontawesome-free@6.7.0/svgs/brands/github.svg
|
|
107
|
+
```
|
|
117
108
|
|
|
118
|
-
|
|
109
|
+
The vendored file will be written to `vendor/icons/` with a flattened name, for example:
|
|
119
110
|
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
pin "md5", preload: false # file lives in vendor/javascript/md5.js
|
|
111
|
+
```
|
|
112
|
+
@fortawesome--fontawesome-free--svgs--brands--github.svg
|
|
113
|
+
```
|
|
124
114
|
|
|
125
|
-
|
|
126
|
-
<%= javascript_iconmap_tags %>
|
|
115
|
+
Because `vendor/icons` is added to the Rails asset paths you can reference the file from views. For inline SVG rendering, we recommend using the `inline_svg` gem (https://github.com/jamesmartin/inline_svg). Example ERB:
|
|
127
116
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
...
|
|
117
|
+
```erb
|
|
118
|
+
<%= inline_svg_tag '@fortawesome--fontawesome-free--svgs--brands--github.svg', class: 'icon' %>
|
|
131
119
|
```
|
|
132
120
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
Example:
|
|
121
|
+
Or using asset helpers directly:
|
|
136
122
|
|
|
137
123
|
```ruby
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
pin "md5", preload: ['application', 'alternate']
|
|
124
|
+
image_tag asset_path('@fortawesome--fontawesome-free--svgs--brands--github.svg'), alt: 'GitHub'
|
|
125
|
+
```
|
|
141
126
|
|
|
142
|
-
|
|
143
|
-
<%= javascript_iconmap_tags 'alternate' %>
|
|
127
|
+
### Unpinning icons
|
|
144
128
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
129
|
+
Remove an icon and its vendored file:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
./bin/iconmap unpin @fortawesome/fontawesome-free/svgs/brands/github.svg
|
|
148
133
|
```
|
|
149
134
|
|
|
135
|
+
This removes the matching `pin` line from `config/iconmap.rb` and deletes the vendored SVG file from `vendor/icons/`.
|
|
150
136
|
|
|
137
|
+
### Checking for outdated icons
|
|
151
138
|
|
|
152
|
-
|
|
139
|
+
Check jsdelivr for newer versions of the npm packages behind your pinned icons:
|
|
153
140
|
|
|
154
|
-
|
|
141
|
+
```bash
|
|
142
|
+
./bin/iconmap outdated
|
|
143
|
+
```
|
|
155
144
|
|
|
156
|
-
|
|
145
|
+
Example output:
|
|
157
146
|
|
|
158
|
-
```
|
|
159
|
-
|
|
147
|
+
```
|
|
148
|
+
| Icon | Current | Latest |
|
|
149
|
+
|------------------------------------------------------|---------|--------|
|
|
150
|
+
| @fortawesome/fontawesome-free/svgs/brands/github.svg | 6.7.0 | 6.7.2 |
|
|
151
|
+
1 outdated icon found
|
|
152
|
+
```
|
|
160
153
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
end
|
|
154
|
+
If jsdelivr fails to resolve a version for a package, the table will show an error message in the `Latest` column.
|
|
155
|
+
|
|
156
|
+
### Updating outdated icons
|
|
157
|
+
|
|
158
|
+
Re-download icons from packages that have newer versions available and update your pins:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
./bin/iconmap update
|
|
170
162
|
```
|
|
171
163
|
|
|
172
|
-
|
|
164
|
+
For each outdated icon, this command:
|
|
173
165
|
|
|
174
|
-
|
|
175
|
-
|
|
166
|
+
- Downloads the SVG for the latest version
|
|
167
|
+
- Replaces the vendored file in `vendor/icons/`
|
|
168
|
+
- Updates the `# @<version>` comment in `config/iconmap.rb`
|
|
169
|
+
|
|
170
|
+
### Re-downloading all icons
|
|
171
|
+
|
|
172
|
+
Re-download every pinned icon from jsdelivr, regardless of version:
|
|
176
173
|
|
|
177
|
-
|
|
174
|
+
```bash
|
|
175
|
+
./bin/iconmap pristine
|
|
178
176
|
```
|
|
179
177
|
|
|
178
|
+
This is useful after checking out a new branch, restoring from backup, or when vendored files may be corrupted.
|
|
180
179
|
|
|
181
|
-
|
|
180
|
+
If you commit the vendored files to your repository you will not need to run `pristine` after a fresh checkout; run it only when files are missing or you suspect corruption.
|
|
182
181
|
|
|
183
|
-
|
|
182
|
+
### Security audit
|
|
184
183
|
|
|
185
|
-
|
|
184
|
+
Check the npm registry for known security vulnerabilities in your pinned packages:
|
|
186
185
|
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
// some checkout specific js
|
|
186
|
+
```bash
|
|
187
|
+
./bin/iconmap audit
|
|
190
188
|
```
|
|
191
189
|
|
|
192
|
-
|
|
190
|
+
Example output:
|
|
193
191
|
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
192
|
+
```
|
|
193
|
+
| Package | Severity | Vulnerable versions | Vulnerability |
|
|
194
|
+
|----------------|----------|---------------------|----------------------|
|
|
195
|
+
| some-package | high | < 2.0.0 | Remote code execution|
|
|
196
|
+
1 vulnerability found: 1 high
|
|
198
197
|
```
|
|
199
198
|
|
|
200
|
-
|
|
199
|
+
The command exits with status 1 when vulnerabilities are found.
|
|
201
200
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
201
|
+
### Listing pinned packages
|
|
202
|
+
|
|
203
|
+
Display all pinned icons with their resolved versions:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
./bin/iconmap packages
|
|
206
207
|
```
|
|
207
208
|
|
|
208
|
-
|
|
209
|
+
Example output:
|
|
209
210
|
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
```
|
|
212
|
+
@fortawesome/fontawesome-free 6.7.2 @fortawesome/fontawesome-free/svgs/brands/github.svg
|
|
213
|
+
@fortawesome/fontawesome-free 6.7.2 @fortawesome/fontawesome-free/svgs/solid/heart.svg
|
|
213
214
|
```
|
|
214
215
|
|
|
216
|
+
## Configuration
|
|
215
217
|
|
|
216
|
-
|
|
218
|
+
### config/iconmap.rb
|
|
217
219
|
|
|
218
|
-
|
|
220
|
+
The icon map file uses `pin` directives to define vendored icons:
|
|
219
221
|
|
|
220
222
|
```ruby
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
223
|
+
# config/iconmap.rb
|
|
224
|
+
|
|
225
|
+
# Pin icons by running ./bin/iconmap
|
|
226
|
+
|
|
227
|
+
# Pin with version comment (automatically added by iconmap)
|
|
228
|
+
|
|
229
|
+
# Pin without version comment (version will be resolved dynamically)
|
|
224
230
|
```
|
|
225
231
|
|
|
226
|
-
|
|
232
|
+
Iconmap does not currently support additional pin options (like `preload:` or `to:`) – every pin represents a single SVG at a specific version.
|
|
233
|
+
|
|
234
|
+
If you need to combine multiple maps (for engines or shared gems) see the "Composing icon maps" section below.
|
|
235
|
+
|
|
236
|
+
### Cache sweeping
|
|
227
237
|
|
|
238
|
+
In development and test environments Iconmap can automatically clear its internal caches when files change.
|
|
228
239
|
|
|
229
|
-
|
|
240
|
+
The engine configures:
|
|
230
241
|
|
|
231
|
-
|
|
242
|
+
- `config.iconmap.paths` — list of iconmap config files (by default just `config/iconmap.rb`)
|
|
243
|
+
- `config.iconmap.sweep_cache` — whether to set up file watching (defaults to `Rails.env.local?`)
|
|
244
|
+
- `config.iconmap.cache_sweepers` — extra directories to watch in addition to `vendor/icons`
|
|
232
245
|
|
|
233
|
-
|
|
246
|
+
Behavior:
|
|
247
|
+
|
|
248
|
+
- An asset watcher clears the map cache when vendored SVGs in `vendor/icons` change (the watcher observes `*.svg`).
|
|
249
|
+
- A dedicated `Iconmap::Reloader` watches the `config.iconmap.paths` (for example `config/iconmap.rb`) and automatically re-draws the map when pin files change — this avoids needing to restart the Rails server after editing pins in development.
|
|
250
|
+
|
|
251
|
+
To opt out of automatic reloading set `config.iconmap.sweep_cache = false` in your environment config.
|
|
252
|
+
|
|
253
|
+
## Composing icon maps
|
|
254
|
+
|
|
255
|
+
By default, Rails loads the icon map from `config/iconmap.rb` into `Rails.application.iconmap`.
|
|
256
|
+
|
|
257
|
+
You can combine multiple icon maps by adding paths to `Rails.application.config.iconmap.paths`, for example from a Rails engine:
|
|
234
258
|
|
|
235
259
|
```ruby
|
|
236
260
|
# my_engine/lib/my_engine/engine.rb
|
|
237
|
-
|
|
238
261
|
module MyEngine
|
|
239
262
|
class Engine < ::Rails::Engine
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
# ...
|
|
243
|
-
app.config.iconmap.cache_sweepers << Engine.root.join("app/assets/icons")
|
|
263
|
+
initializer 'my-engine.iconmap', before: 'iconmap' do |app|
|
|
264
|
+
app.config.iconmap.paths << Engine.root.join('config/iconmap.rb')
|
|
244
265
|
end
|
|
245
266
|
end
|
|
246
267
|
end
|
|
247
268
|
```
|
|
248
269
|
|
|
249
|
-
|
|
270
|
+
The engine's `config/iconmap.rb` can then declare its own pins that will be merged into the main application's icon map.
|
|
250
271
|
|
|
251
|
-
|
|
252
|
-
- `./bin/iconmap outdated` checks the NPM registry for new versions
|
|
253
|
-
- `./bin/iconmap audit` checks the NPM registry for known security issues
|
|
272
|
+
## Rails integration
|
|
254
273
|
|
|
255
|
-
|
|
274
|
+
Iconmap for Rails integrates via a Rails engine (`Iconmap::Engine`) that:
|
|
256
275
|
|
|
257
|
-
|
|
276
|
+
1. **Defines `Rails.application.iconmap`** as an `Iconmap::Map` instance.
|
|
277
|
+
2. **Loads pin definitions** from all paths in `config.iconmap.paths` (by default `config/iconmap.rb`).
|
|
278
|
+
3. **Adds `vendor/icons` to the asset pipeline** so your SVGs are served like any other asset.
|
|
279
|
+
4. **Optionally sets up a cache sweeper** in development and test that watches icon files and clears the map cache when they change.
|
|
258
280
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
281
|
+
### Accessing the icon map
|
|
282
|
+
|
|
283
|
+
```ruby
|
|
284
|
+
iconmap = Rails.application.iconmap
|
|
285
|
+
iconmap.packages #=> hash of pin name -> MappedFile
|
|
262
286
|
```
|
|
263
287
|
|
|
288
|
+
The `Iconmap::Map` API is intentionally small and internal – most applications should interact with icons via the CLI and asset helpers, not by manipulating the map directly.
|
|
289
|
+
|
|
264
290
|
## License
|
|
265
291
|
|
|
266
292
|
Iconmap for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
load "rails/tasks/engine.rake"
|
|
3
|
+
require 'bundler/setup'
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
APP_RAKEFILE = File.expand_path('test/dummy/Rakefile', __dir__)
|
|
6
|
+
load 'rails/tasks/engine.rake'
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
load 'rails/tasks/statistics.rake'
|
|
9
9
|
|
|
10
|
-
require
|
|
10
|
+
require 'bundler/gem_tasks'
|
|
11
|
+
|
|
12
|
+
require 'rake/testtask'
|
|
11
13
|
|
|
12
14
|
Rake::TestTask.new(:test) do |t|
|
|
13
15
|
t.libs << 'test'
|