flame_routes_toys 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d1fd62ee5f5285a8cd4cb43e5bbae189a4e66afd94746b795d5cf62c4587d02d
4
+ data.tar.gz: 24cb65ed1757108b6dab2370c265cdb85223d25ed42ca08b4cf93c420eabc79c
5
+ SHA512:
6
+ metadata.gz: e7336b346d13879f1bec73ac13e93159409ea819ddb2aac2f77bf0748e331a9e9a12b6c2d229695b0a9ad8ed92c24f6c0c6ef6f0981d50c9ef127756c26cd56c
7
+ data.tar.gz: d1fa3efa6579947d5f58e366d9afab4da06fb3a6e238edc6c7827d3d6b024b7c7338685c7da123f5ed6d8ad9a7901a139f8ae200fe3369d8f58a438177c5e102
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ ## master (unreleased)
4
+
5
+ ## 0.1.0 (2020-07-12)
6
+
7
+ * Initial release.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Alexander Popov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,59 @@
1
+ # Flame Routes Toys
2
+
3
+ [![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/AlexWayfer/flame_routes_toys?style=flat-square)](https://cirrus-ci.com/github/AlexWayfer/flame_routes_toys)
4
+ [![Codecov branch](https://img.shields.io/codecov/c/github/AlexWayfer/flame_routes_toys/master.svg?style=flat-square)](https://codecov.io/gh/AlexWayfer/flame_routes_toys)
5
+ [![Code Climate](https://img.shields.io/codeclimate/maintainability/AlexWayfer/flame_routes_toys.svg?style=flat-square)](https://codeclimate.com/github/AlexWayfer/flame_routes_toys)
6
+ [![Depfu](https://img.shields.io/depfu/AlexWayfer/flame_routes_toys?style=flat-square)](https://depfu.com/repos/github/AlexWayfer/flame_routes_toys)
7
+ [![Inline docs](https://inch-ci.org/github/AlexWayfer/flame_routes_toys.svg?branch=master)](https://inch-ci.org/github/AlexWayfer/flame_routes_toys)
8
+ [![license](https://img.shields.io/github/license/AlexWayfer/flame_routes_toys.svg?style=flat-square)](https://github.com/AlexWayfer/flame_routes_toys/blob/master/LICENSE.txt)
9
+ [![Gem](https://img.shields.io/gem/v/flame_routes_toys.svg?style=flat-square)](https://rubygems.org/gems/flame_routes_toys)
10
+
11
+ Toys template for printing [Flame](https://github.com/AlexWayfer/flame)
12
+ application routes.
13
+
14
+ ## Installation
15
+
16
+ Add this line to your application's Gemfile:
17
+
18
+ ```ruby
19
+ gem 'flame_routes_toys'
20
+ ```
21
+
22
+ And then execute:
23
+
24
+ ```shell
25
+ bundle install
26
+ ```
27
+
28
+ Or install it yourself as:
29
+
30
+ ```shell
31
+ gem install flame_routes_toys
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ ```ruby
37
+ require 'flame_routes_toys'
38
+ expand FlameRoutesToys::Template, application: MyProject::Application
39
+ ```
40
+
41
+ ## Development
42
+
43
+ After checking out the repo, run `bundle install` to install dependencies.
44
+
45
+ Then, run `toys rspec` to run the tests.
46
+
47
+ To install this gem onto your local machine, run `toys gem install`.
48
+
49
+ To release a new version, run `toys gem release %version%`.
50
+ See how it works [here](https://github.com/AlexWayfer/gem_toys#release).
51
+
52
+ ## Contributing
53
+
54
+ Bug reports and pull requests are welcome on [GitHub](https://github.com/AlexWayfer/flame_routes_toys).
55
+
56
+ ## License
57
+
58
+ The gem is available as open source under the terms of the
59
+ [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'flame_routes_toys/template'
4
+ require_relative 'flame_routes_toys/version'
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'toys-core'
4
+
5
+ module FlameRoutesToys
6
+ ## Define toys for benchmark
7
+ class Template
8
+ include Toys::Template
9
+
10
+ attr_reader :application
11
+
12
+ def initialize(application:)
13
+ @application = application
14
+ end
15
+
16
+ on_expand do |template|
17
+ tool :routes do
18
+ desc 'Print application routes'
19
+
20
+ to_run do
21
+ require 'rack'
22
+ ENV['RACK_ENV'] ||= 'development'
23
+
24
+ ## Properly loads environment
25
+ Rack::Builder.parse_file "#{context_directory}/config.ru"
26
+
27
+ puts template.application.router.routes
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FlameRoutesToys
4
+ VERSION = '0.1.0'
5
+ end
metadata ADDED
@@ -0,0 +1,208 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: flame_routes_toys
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Alexander Popov
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-07-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: toys-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.10.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.10.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry-byebug
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.9'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.9'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: gem_toys
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.3.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.3.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: toys
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.10.4
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.10.4
83
+ - !ruby/object:Gem::Dependency
84
+ name: codecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.2.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.2.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '3.9'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '3.9'
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.18.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.18.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.87.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.87.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop-performance
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '1.0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '1.0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rubocop-rspec
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '1.0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '1.0'
167
+ description: 'Toys template for printing Flame application routes.
168
+
169
+ '
170
+ email:
171
+ - alex.wayfer@gmail.com
172
+ executables: []
173
+ extensions: []
174
+ extra_rdoc_files: []
175
+ files:
176
+ - CHANGELOG.md
177
+ - LICENSE.txt
178
+ - README.md
179
+ - lib/flame_routes_toys.rb
180
+ - lib/flame_routes_toys/template.rb
181
+ - lib/flame_routes_toys/version.rb
182
+ homepage: https://github.com/AlexWayfer/flame_routes_toys
183
+ licenses:
184
+ - MIT
185
+ metadata:
186
+ source_code_uri: https://github.com/AlexWayfer/flame_routes_toys
187
+ homepage_uri: https://github.com/AlexWayfer/flame_routes_toys
188
+ changelog_uri: https://github.com/AlexWayfer/flame_routes_toys/blob/master/CHANGELOG.md
189
+ post_install_message:
190
+ rdoc_options: []
191
+ require_paths:
192
+ - lib
193
+ required_ruby_version: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - ">="
196
+ - !ruby/object:Gem::Version
197
+ version: '2.5'
198
+ required_rubygems_version: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ requirements: []
204
+ rubygems_version: 3.1.2
205
+ signing_key:
206
+ specification_version: 4
207
+ summary: Toys template for printing Flame application routes.
208
+ test_files: []