fly.io-rails 0.0.2-arm64-darwin → 0.0.3-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f00ff31f7361f547fe378be5a1444dc196d50f9166a57b55a8a25dd850dbd01e
4
- data.tar.gz: 9a8947b41c02c4b7890f80632b518f01fbbc1f135dde53663ff5f98e404ee83e
3
+ metadata.gz: 10e727052bd41ea67d1e11cfa2a5bbc17471b9cdf9683d706d58f66e36792179
4
+ data.tar.gz: 395c4d0ff49ec2cdfdce17ca6bfebf7f24417f35ccc51b05d7edda36eb6d6d76
5
5
  SHA512:
6
- metadata.gz: 10f325efde9eedbe3e363240b507f801747b49c54f2c7961a8a1c3c99ad587b84e33fdcb92c32233b9364a0d7be8dd0876246917b9c1a018493ea12219e6a3ee
7
- data.tar.gz: 5988b1583429a523ef8a130200d06cc96164d319da1527bbc6a23c31c47d6b09ab39d80ff0a1e5f0aa7b97f17fbe3f47e642ce6a01a13baed7d0fd05ec8d49f5
6
+ metadata.gz: ebf763915628208e68d7e5bead7b1ff19fcea398f5d245bbeefa2a49245f0a246d3850942297959ce3d2498e2bc0f6bb3edf93be2de474c9cd6ace98d5d96efe
7
+ data.tar.gz: 6c9ce9ba198cfe92408959ed507ce14a83f58767c2bf56bffca70446ee7fe69398d2e1e7c510043a9594caa1e656e980e54b7ad655ebced970a8b6a9d6e10d0d
data/README.md CHANGED
@@ -6,26 +6,7 @@ Add [Fly.io](https://fly.io) support to [Rails](https://rubyonrails.org/).
6
6
 
7
7
  <u>pre-alpha</u>.
8
8
 
9
- In fact, the gem has not been yet been pushed to the rubygems
10
- repository as while creating a github repository is an easily reversible act,
11
- wiping all memory of a mis-named gem is considerably more challenging.
12
-
13
- It currently is possible to build the gem files, install the prerequisite
14
- `ruby-fly` gem, and then install the platform specific gem using `--local`.
15
- You can also add the gem to your Gemfile using the `path:` argument to the
16
- `gem` statement/method call. Of course, all of this will be taken care of
17
- for you once this gem has been published.
18
-
19
- ## Quickstart/summary
20
-
21
- ```sh
22
- rails new demo
23
- cd demo
24
- bundle add fly.io-rails
25
- flyctl auth login
26
- bin/rails fly:launch
27
- bin/rails deploy
28
- ```
9
+ For usage instructions, see [Fly.io Rails Advanced Guide: Terraform](https://fly.io/docs/rails/advanced-guides/terraform/).
29
10
 
30
11
  ## Build instructions
31
12
 
@@ -38,152 +19,3 @@ every supported platform as well as an additional gem that doesn't
38
19
  include a binary.
39
20
 
40
21
  To download new binaries, run `rake clobber` then `rake package` agein.
41
-
42
- ## Description
43
-
44
- - `bundle add fly.io-rails`
45
-
46
- This will install `ruby-fly` middleware, add new Rails tasks, extend the
47
- channel and job generatotors, and platform binaries for
48
- [flyctl](https://github.com/superfly/flyctl#readme). I've followed the
49
- trail blazed by [nokogiri](https://nokogiri.org/) and others to make
50
- platform binaries happen.
51
-
52
- - `bin/rails fly:launch`
53
-
54
- This won't be a mere front enty to [`flyctl
55
- launch`](https://fly.io/docs/flyctl/launch/). It will use
56
- [`thor`](https://github.com/rails/thor#thor) to rewrite the configuration
57
- for the `production` environment as well as tweak the `Dockerfile` and
58
- `fly.toml` based on your application - in particular the configuration for
59
- ActiveRecord, ActiveJob, and ActionCable. The people at Fly will know what
60
- databases and message queing systems work best on their platform and should
61
- make it easy to do the right thing.
62
-
63
- As an example, the default production database for a new application in
64
- Rails is sqlite3. Either this will need to be replaced by Postgre in
65
- the Rails configuration *or* a volume will need to be defined, mounted,
66
- and the Rails configuration modified to point to the new mount point.
67
-
68
- This gem should pick one of those paths as the default, and provide an option to chose other paths.
69
-
70
- - `bin/rails generate channel`, `bin/rails generate job`, etc.
71
-
72
- Rails applications are generally not invented fully formed. They evolve and
73
- add features. I don't want people to think about having to configure rails
74
- AND configure fly when then add features. Generators that developers
75
- already use today should be able to update both the Rails and Fly
76
- configurations in a consistent manner.
77
-
78
- For now, both the Rails tasks and generators don't actually modify the Rails
79
- configuratio to support Fly, instead they merely output the string `Configuring
80
- fly...`. Let your imagination run wild.
81
-
82
- ## Motivation
83
-
84
- Oversimplifying and exagerating to make a point, `flyctl launch` generates an
85
- initial fly configuration based on the state of the application at launch time
86
- but leaves configuring your Rails application up to you. The initial Fly
87
- configuration may need to be tweaked, and both the fly and Rails configurations
88
- will need to be maintained as the application evolves.
89
-
90
- From a Rails developer perspective, this makes fly an additional framework that
91
- must be learned and attended to.
92
-
93
- This can all be changed with a single `bundle add` command. Everything from
94
- new `rails` tasks to extending the behavior of existing generators to making
95
- changes to configuration to monkeypatching Rails internals itself are on the
96
- table.
97
-
98
- A few sublte but important mindset changes are necessary to pull this off:
99
-
100
- * Instead of "we support every (or perhaps even only 'most') Rails
101
- configuration" the mindset we should strive for is "we provide a default
102
- production configuration that works for most, and provide options to add or
103
- replace components as desired".
104
-
105
- We should be bold and daring. We should chose a default web server, a
106
- default database, a default active job queue adapter, a default action
107
- cable subscription adapter, etc., etc., etc.
108
-
109
- Over time, this should encompas everything needed for monitoring and
110
- deployment. Requirements for things like log file management should be
111
- anticipated and accounted for.
112
-
113
- * Any configuration artifact that is generated and needs to be checked into
114
- the application's source control repository needs to be [beautiful
115
- code](https://rubyonrails.org/doctrine#beautiful-code). If you look at
116
- configuration files provided by either `rails new` or by rails generators,
117
- they have comments. They don't configure things that don't apply to you.
118
-
119
- A concrete example: Rails 7 applications default to import maps. A
120
- `Dockerfile` generated for such an app should not contain code that deals
121
- with `yarn` or `node_modules`.
122
-
123
- And as a closing remark - to be fair adding Rails support to Fly and adding Fly
124
- support to Rails are more complementary than competing efforts.
125
-
126
- ## Future
127
-
128
- > Que sera, sera
129
-
130
- -- Doris Day
131
-
132
- I don't know what the future is going to hold, but some guesses:
133
-
134
- * It is plausible that a code base written in Ruby and with access to
135
- libraries like [Thos](http://whatisthor.com/) and focused exclusively on
136
- Rails may attract more contributions from the Rails community than a
137
- codebase written in Go and targetting many disparate frameworks.
138
- * Flyctl launch can continue to provide a basic Fly configuration for Rails,
139
- but if this effort is successful these configurations would largely be
140
- replaced by more tailors configurations that are updated by generators and
141
- rake tasks as the application evolves.
142
- * Not every flyctl command needs to have a Rails wrapper -- only the common
143
- task do. It is quiet OK for developers to deal directly with fly when it
144
- makes sence to do so. But those flyctl command that are wrapped may need
145
- options added that enable them to be run without the need to prompt the
146
- user.
147
- * This gem could be built and published alongside the flyctl executables, and
148
- `flyctl version update` could detect whether or not it was installed as a
149
- gem and react appropriately.
150
-
151
- ## Call to Action
152
-
153
- > good ideas and bad code build communities, the other three combinations do
154
- > not
155
-
156
- -- Stefano Mazzocchi
157
-
158
- > the best way to get the right answer on the internet is not to ask a
159
- > question; it's to post the wrong answer.
160
-
161
- -- Ward Cunningham
162
-
163
- I don't presume that any specific line of code in this initial implementation
164
- will last the test of time. Heck, I'm not even confident enough in the
165
- proposed name to register the gem, though the name does feel *rails-like* -
166
- just take a look at any Rails `Gemfile` to see.
167
-
168
- My hope is that there is enough scaffolding here to not only make clear what
169
- the possibilities are, but also enough structure so that it is fairly obvious
170
- where new logic should go, together there is not only enough promise and
171
- structure to attract a community.
172
-
173
- Some starter ideas:
174
-
175
- * Can we make `bin/rails deploy` smart enough to invoke `flyctl auth login` if
176
- you are not logged in and `bin/rails fly:launch` if the application had not
177
- previously been launched, with the goal of reducing the number of commands a
178
- user has to issue to get started. Also I'm impressed by the way auth login
179
- launches a browser, can we do the same for fly launch?
180
-
181
- * While a number of application configuration changes are made through
182
- generators, not all are. For example, upgrading the version of Ruby to be
183
- used. Perhaps we could create tasks for some of these, but likely it will
184
- be worthwhile to create a `fly:reconfig` task.
185
-
186
- Finally, once this repository is in the superfly github organization and
187
- a gem has been published, this README should be rewritten from focus on
188
- raison d'être and to a focus on what value it would bring to those that
189
- install and use it.
Binary file
@@ -1,3 +1,3 @@
1
1
  module Fly_io
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fly.io-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Sam Ruby