days 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. data/.travis.yml +0 -1
  2. data/README.md +72 -14
  3. data/days.gemspec +3 -3
  4. data/lib/days/version.rb +1 -1
  5. metadata +10 -10
data/.travis.yml CHANGED
@@ -1,7 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 1.9.2
4
- - 1.9.3
5
4
  notifications:
6
5
  email:
7
6
  - sorah@tubusu.net
data/README.md CHANGED
@@ -2,30 +2,88 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/sorah/days.png?branch=master)](https://travis-ci.org/sorah/days)
4
4
 
5
- TODO: Write a gem description
5
+ Days is simple blog system built up with Sinatra.
6
6
 
7
7
  ## Installation
8
8
 
9
- Add this line to your application's Gemfile:
9
+ $ gem install days
10
10
 
11
- gem 'days'
11
+ ## Set up
12
12
 
13
- And then execute:
13
+ $ mkdir foo && cd foo
14
+ $ days init
15
+ $ days migration
14
16
 
15
- $ bundle
17
+ ### Start development server
16
18
 
17
- Or install it yourself as:
19
+ $ days server
18
20
 
19
- $ gem install days
21
+ Access `/admin/setup` path to setup admin user.
22
+
23
+ ## Configuration
24
+
25
+ edit `config.yml`. We're using [settingslogic](https://github.com/binarylogic/settingslogic) to use namespace based on environment.
26
+
27
+ * `permalink`: URL Style for permalink. String like `{TAG}` in URL will replaced with something.
28
+
29
+ * Example: `/{year}/{month}/{id}-{slug}` with entry published in Jan 2013, slug: `slug` and id: `42` → `/2013/01/42-slug`
30
+ * `{slug}` - entry slug
31
+ * `{id}` - entry id
32
+ * `{year}` - year that entry published
33
+ * `{month}` - month that entry published
34
+ * `{day}` - day that entry published
35
+ * `{hour}` - hour that entry published
36
+ * `{minute}` - minute that entry published
37
+ * `{second}` - second that entry published
38
+
39
+ * `title`: Your blog title.
40
+ * `database`: Database configuration. This will be passed to `ActiveRecord::Base.establish_connection`.
41
+
42
+ ## Deploy
43
+
44
+ Days is basically Rack app, so you can deploy using thin, unicorn, and puma, etc.
45
+
46
+ ### Deploy to Heroku
47
+
48
+ First, prepare days app repository
49
+
50
+ $ days init
51
+ $ vim config.yml
20
52
 
21
- ## Usage
53
+ ...
54
+ group :production do
55
+ gem "pg"
56
+ end
57
+ ...
22
58
 
23
- TODO: Write usage instructions here
59
+ $ bundle install --without production
60
+ $ git init && git add . && git commit -m 'initial'
61
+
62
+ Then, create heroku apps and prepare heroku postgres database:
63
+
64
+ $ heroku apps:create
65
+ $ heroku addons:add heroku-postgresql:dev && heroku pg:wait
66
+ $ heroku pg:promote `heroku config | grep HEROKU_POSTGRESQL|cut -d: -f 1`
67
+
68
+ Next, push repository to heroku.
69
+
70
+ $ git push -u heroku master
71
+
72
+ Finally, migrate the DB and restart the app.
73
+
74
+ $ heroku run days migrate production
75
+ $ heroku restart
76
+
77
+ Now, you can access to your new blog by:
78
+
79
+ $ heroku apps:open
80
+
81
+ Access `/admin/setup` path to setup admin user.
24
82
 
25
83
  ## Contributing
26
84
 
27
- 1. Fork it
28
- 2. Create your feature branch (`git checkout -b my-new-feature`)
29
- 3. Commit your changes (`git commit -am 'Add some feature'`)
30
- 4. Push to the branch (`git push origin my-new-feature`)
31
- 5. Create new Pull Request
85
+ Fork and give me pull-request, please!
86
+
87
+ ## To-dos
88
+
89
+ * Plugins
data/days.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
 
20
- gem.add_dependency "sinatra", '~> 1.3.3'
20
+ gem.add_dependency "sinatra", '~> 1.3'
21
21
  gem.add_dependency "thor"
22
22
  gem.add_dependency "rack_csrf"
23
23
 
@@ -30,8 +30,8 @@ Gem::Specification.new do |gem|
30
30
  gem.add_dependency "redcarpet"
31
31
  gem.add_dependency "builder"
32
32
 
33
- gem.add_dependency "activerecord", "~> 3.2.9"
34
- gem.add_dependency "kaminari", "> 0.13.0"
33
+ gem.add_dependency "activerecord", "~> 3.2"
34
+ gem.add_dependency "kaminari", "~> 0.13"
35
35
  gem.add_dependency "padrino-helpers"
36
36
  gem.add_dependency "stringex"
37
37
  gem.add_dependency "bcrypt-ruby"
data/lib/days/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Days
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: days
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-03 00:00:00.000000000 Z
12
+ date: 2013-01-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 1.3.3
21
+ version: '1.3'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 1.3.3
29
+ version: '1.3'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: thor
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -162,7 +162,7 @@ dependencies:
162
162
  requirements:
163
163
  - - ~>
164
164
  - !ruby/object:Gem::Version
165
- version: 3.2.9
165
+ version: '3.2'
166
166
  type: :runtime
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
@@ -170,23 +170,23 @@ dependencies:
170
170
  requirements:
171
171
  - - ~>
172
172
  - !ruby/object:Gem::Version
173
- version: 3.2.9
173
+ version: '3.2'
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: kaminari
176
176
  requirement: !ruby/object:Gem::Requirement
177
177
  none: false
178
178
  requirements:
179
- - - ! '>'
179
+ - - ~>
180
180
  - !ruby/object:Gem::Version
181
- version: 0.13.0
181
+ version: '0.13'
182
182
  type: :runtime
183
183
  prerelease: false
184
184
  version_requirements: !ruby/object:Gem::Requirement
185
185
  none: false
186
186
  requirements:
187
- - - ! '>'
187
+ - - ~>
188
188
  - !ruby/object:Gem::Version
189
- version: 0.13.0
189
+ version: '0.13'
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: padrino-helpers
192
192
  requirement: !ruby/object:Gem::Requirement