tranzito_utils 1.0.3 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -13
- data/app/assets/builds/tranzito_utils-compiled.css +11102 -0
- data/app/assets/stylesheets/tranzito_utils/_admin_header.scss +73 -0
- data/app/assets/stylesheets/tranzito_utils/_alerts.scss +42 -0
- data/app/assets/stylesheets/tranzito_utils/_pagination.scss +36 -0
- data/app/assets/stylesheets/tranzito_utils/_table_extensions.scss +175 -0
- data/app/assets/stylesheets/tranzito_utils/_utils.scss +83 -0
- data/app/assets/stylesheets/tranzito_utils/_variables.scss +2 -0
- data/app/assets/stylesheets/tranzito_utils.scss +13 -0
- data/app/views/tranzito_utils/_flash_messages.haml +10 -0
- data/lib/tranzito_utils/concerns/set_period.rb +8 -0
- data/lib/tranzito_utils/gem.rb +3 -0
- data/lib/tranzito_utils/helpers/admin_helper.rb +9 -0
- data/lib/tranzito_utils/helpers/helpers.rb +76 -0
- data/lib/tranzito_utils/version.rb +1 -1
- data/lib/tranzito_utils.rb +4 -1
- metadata +27 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3faa67b639b33c1c1cbb2f8d65b5f1d4f79820781ff7c286a054d017dbce00e3
|
4
|
+
data.tar.gz: cedce42eaea116b806a5b2a09a259c914ad181087a41929c0396489827d82489
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8681efed6dd8c0cba41a871936b1a55bf9e7593cc61e90443b994ae80e535a9690d855609f48cd5a961b1430e68e1d96d42277732143bffd1ac6670543af5857
|
7
|
+
data.tar.gz: 24262cc48e9b4c9e70319bf723d7b4c8c7280b752c70d76d17d338ce13332936f955174328f109bfe43eea3c9bb0fea9e5c1a5632e2ea162799302638f0c0e98
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
| `SetPeriod` | Controller Concern | Time period selection and browsing |
|
8
8
|
| `SortableTable` | Controller Concern | Sort column and direction |
|
9
9
|
| `TimeParser` | Service | Parse time strings into activerecord time objects |
|
10
|
-
| `
|
10
|
+
| `Normalize` | Service | Normalize truthy and falsey strings |
|
11
11
|
| `GraphingHelper` | Helper | Graphing helper for [chartkick](https://chartkick.com/) charts |
|
12
12
|
| `SortableHelper` | Helper | Sort table headers |
|
13
13
|
|
@@ -69,26 +69,20 @@ render partial: "/tranzito_utils/period_select"
|
|
69
69
|
|
70
70
|
This will include the period_select view for filtering.
|
71
71
|
|
72
|
-
###
|
72
|
+
### Helpers
|
73
73
|
|
74
|
-
For
|
74
|
+
For gems helpers, you need to add this into your `application_helper.rb` file.
|
75
75
|
|
76
76
|
```
|
77
|
-
include TranzitoUtils::
|
77
|
+
include TranzitoUtils::Helpers
|
78
78
|
```
|
79
|
+
### Assets
|
79
80
|
|
80
|
-
|
81
|
-
|
82
|
-
Same for GraphingHelper, if you want to use its methods then you need to add that line into your `application_helper.rb` file.
|
81
|
+
To include the styles from the gem you need to add this into your application.scss, this will include the compiled CSS into your application.
|
83
82
|
|
84
83
|
```
|
85
|
-
|
84
|
+
@import url('/tranzito_utils-compiled.css')
|
86
85
|
```
|
87
|
-
|
88
|
-
#### ParamsNormalizer
|
89
|
-
|
90
|
-
Params normalizer uses activerecord to parse strings into booleans.
|
91
|
-
|
92
86
|
## tranzito_utils_js (npm)
|
93
87
|
You also need to add this NPM package in order to use the gem without any issue. You can install it using `yarn` or `npm`.
|
94
88
|
|
@@ -126,6 +120,13 @@ As for `PeriodSelector`, you can use it by initializing like this
|
|
126
120
|
## License
|
127
121
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
128
122
|
|
123
|
+
## Development
|
124
|
+
|
125
|
+
To compile the updated styles run these command
|
126
|
+
```
|
127
|
+
cd tranzito_utils_js
|
128
|
+
yarn build:css
|
129
|
+
```
|
129
130
|
|
130
131
|
## Testing
|
131
132
|
|