tranzito_utils 1.0.3 → 1.1.0
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/lib/tranzito_utils/concerns/set_period.rb +8 -0
- data/lib/tranzito_utils/gem.rb +3 -0
- data/lib/tranzito_utils/helpers/helpers.rb +75 -0
- data/lib/tranzito_utils/version.rb +1 -1
- data/lib/tranzito_utils.rb +3 -1
- metadata +25 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3664eebcd88f56e5ecf4ab80737b75a84e86a26eed0f7af8bfbcdfd4df3c9186
|
4
|
+
data.tar.gz: c6d1caffa31d644b0696ba0002ac467c1c3c9c8451b543ca26111991aa81dd74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 970a0139b35777468242b4e466b9e232b8a7f3a4c4bcb363e442c4ebd8128bdfefca3a7817c5b5792de78541248002c7daf73831956cafb6f97b46da6c78fb63
|
7
|
+
data.tar.gz: 9c65508c9de100b1c0f23b63f5ca1f27f31d6fefb0be771f357bd634c245d8ed9dfe15b09a37ccc7c80ecfb3ea0975bb2e47472b0e99d896f492e1aadb8ce179
|
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
|
|