reloj 0.1.6 → 0.1.7

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
  SHA1:
3
- metadata.gz: 1b4826790d1742e7cc183f205261714e1a7b6c11
4
- data.tar.gz: d0f2462f85d915f548328e2a7093681fc67a7dac
3
+ metadata.gz: 42da7fc580502d942eb23f8aa85102338741a544
4
+ data.tar.gz: 23060fa9e00ad5ced9d20dc86421283e398ab73d
5
5
  SHA512:
6
- metadata.gz: 9e896f8d60a4d6021c299451884ee68ebb4d00f3e92f2aba128a86857426ac3532c7d1188f8804eb3dd4299dae0871fdf577f8bcd3f153f6fcfc8a56f3c4ea25
7
- data.tar.gz: 61381c1aefdb117bf8c946dcbc210676e6e9c930dc7747b6793753196158438a2a4e355e52f601f5ef700b1dbc5729eb2697caaad9202d1789b81987c19b59c7
6
+ metadata.gz: 0d4eaaa5e8874830e9105d1bd68c492dfb4ee7aa65c0a0530ca1ca7c871cd569a38cf9f841252593b29202c77da8234dea73a20c756051ac3029d8d879fb30d2
7
+ data.tar.gz: 9fce521ca07a2c63c5dd6bd25ab6b2c322093597551ba4b5b163ca678cc904dbdbe2a6d0b54c1d13efcdc21569234818161b242fa21e06024de2a73913f6140d
data/README.md CHANGED
@@ -22,6 +22,30 @@ A lightweight web framework for Ruby for creating database-backed web applicatio
22
22
  4. Using a browser, go to `http://localhost:3000` and you'll see:
23
23
  "Welcome to Reloj!"
24
24
 
25
+ ## Setting up the database
26
+
27
+ Reloj has some built in convenience features to make it easy to set up your database
28
+
29
+ To name your database, change the dbname value in `config/db.yml`. If you need to setup any other values for your local database (username, password, port), you can put them in the same file.
30
+
31
+ To create a database for your app to use, just run:
32
+
33
+ bundle exec rake db:create
34
+
35
+ To destroy the database, run:
36
+
37
+ bundle exec rake db:delete
38
+
39
+ To reset the database, run:
40
+
41
+ bundle exec rake db:reset
42
+
43
+ Finally, to setup your schema and seed your database, use the `db/setup.sql` file. To run this file on the app's databasae, run:
44
+
45
+ bundle exec rake db:setup
46
+
47
+ To learn how to manage the database when deploying, scroll down to the Deploy secction
48
+
25
49
  ## Models and ORM
26
50
  Reloj uses the active record pattern for its object-relational mapping.
27
51
  To use this functionality in your app, create a class for your model in `app/models` and have the model inherit from ModelBase
@@ -87,3 +111,34 @@ Reloj includes a generator for a sample app. To check it out:
87
111
  reloj server
88
112
 
89
113
  4. Navigate to localhost:3000
114
+
115
+
116
+ ## Deploying
117
+ Reloj is built to make deploying to heroku as easy as possible, here's how:
118
+
119
+ 1. Make sure there's a procfile in the project's root directory with the following line:
120
+
121
+ web: bundle exec reloj server
122
+
123
+
124
+ 2. Commit your changes to git
125
+
126
+ git commit -am "procfile"
127
+
128
+ 3. Create a new heroku app using the heroku cli
129
+
130
+ heroku apps:create mynewapp
131
+
132
+ 4. Push your code to heroku (heroku apps:create should automatically add a remote repo to push to)
133
+
134
+ git push heroku master
135
+
136
+ 5. Wait for the push to finish, then create your database tables and seed it as defined in `db/setup.sql`
137
+
138
+ heroku run rake db:setup
139
+
140
+ 6. Wait for the rake task to finish, then open your app:
141
+
142
+ heroku open
143
+
144
+ Enjoy your now-deployed app!
data/lib/reloj/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Reloj
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reloj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - ougarcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-07 00:00:00.000000000 Z
11
+ date: 2015-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -164,13 +164,13 @@ files:
164
164
  - lib/reloj/orm/pg_db.rb
165
165
  - lib/reloj/orm/searchable.rb
166
166
  - lib/reloj/skeletons/common_files/Gemfile
167
+ - lib/reloj/skeletons/common_files/Procfile
167
168
  - lib/reloj/skeletons/common_files/Rakefile
168
169
  - lib/reloj/skeletons/new_app/app/controllers/.keep
169
170
  - lib/reloj/skeletons/new_app/app/models/.keep
170
171
  - lib/reloj/skeletons/new_app/app/views/.keep
171
172
  - lib/reloj/skeletons/new_app/config/routes.rb
172
173
  - lib/reloj/skeletons/new_app/db/.keep
173
- - lib/reloj/skeletons/sample_app/Procfile
174
174
  - lib/reloj/skeletons/sample_app/app/controllers/cats_controller.rb
175
175
  - lib/reloj/skeletons/sample_app/app/models/cat.rb
176
176
  - lib/reloj/skeletons/sample_app/app/views/cats_controller/index.html.erb