copy 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/bin/copy +22 -0
- data/copy.gemspec +1 -0
- data/lib/copy/generators/site/Gemfile +18 -0
- data/lib/copy/generators/site/config.ru +24 -0
- data/lib/copy/generators/site/public/favicon.ico +0 -0
- data/lib/copy/generators/site/public/images/.gitkeep +0 -0
- data/lib/copy/generators/site/public/javascripts/.gitkeep +0 -0
- data/lib/copy/generators/site/public/javascripts/main.js +0 -0
- data/lib/copy/generators/site/public/robots.txt +5 -0
- data/lib/copy/generators/site/public/stylesheets/.gitkeep +0 -0
- data/lib/copy/generators/site/public/stylesheets/main.css +0 -0
- data/lib/copy/generators/site/views/index.html.erb +1 -0
- data/lib/copy/generators/site/views/layout.html.erb +12 -0
- data/lib/copy/version.rb +1 -1
- metadata +33 -7
data/.gitignore
CHANGED
data/bin/copy
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'optparse'
|
5
|
+
require 'copy'
|
6
|
+
require 'copy/version'
|
7
|
+
|
8
|
+
OptionParser.new do |opts|
|
9
|
+
opts.banner = "Usage: copy [options]"
|
10
|
+
opts.on('-n', '--new [DIR]', 'Create a new Copy site in DIR') do |dir|
|
11
|
+
dir ||= '.'
|
12
|
+
site = File.dirname(File.expand_path(__FILE__)) + '/../lib/copy/generators/site/'
|
13
|
+
puts `mkdir -p #{dir} && cp -Riv #{site} #{dir}`
|
14
|
+
puts "Done!"
|
15
|
+
exit(0)
|
16
|
+
end
|
17
|
+
opts.on('-v', '--version') { puts "Copy v#{Copy::VERSION}"; exit(0) }
|
18
|
+
end.parse!
|
19
|
+
|
20
|
+
puts "Run `copy -n DIR' to generate a new Copy site in DIR."
|
21
|
+
puts "Run `copy --help' for all options."
|
22
|
+
exit(0)
|
data/copy.gemspec
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
gem 'copy'
|
2
|
+
|
3
|
+
# Using mongodb for storage? Uncomment these:
|
4
|
+
#
|
5
|
+
# gem 'mongo'
|
6
|
+
# gem 'bson_ext'
|
7
|
+
|
8
|
+
# Using redis?
|
9
|
+
#
|
10
|
+
# gem 'redis'
|
11
|
+
|
12
|
+
# Using mysql, postgres, or sqlite?
|
13
|
+
# Uncomment datamaper and the adapter you're using.
|
14
|
+
#
|
15
|
+
# gem 'datamaper'
|
16
|
+
# gem 'dm-mysql-adapter'
|
17
|
+
# gem 'dm-postgres-adapter'
|
18
|
+
# gem 'dm-sqlite-adapter'
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'copy'
|
2
|
+
|
3
|
+
Copy::Server.config do
|
4
|
+
# Sets a Cache-Control header for the duration specified.
|
5
|
+
# Heroku friendly: http://devcenter.heroku.com/articles/http-caching
|
6
|
+
#
|
7
|
+
set :cache_time, 300
|
8
|
+
|
9
|
+
# If you're storing copy in a data store, you need a user and password
|
10
|
+
# set to protect it. Uncomment these and enter the credentials you want
|
11
|
+
# to use or set them as environment variables.
|
12
|
+
# Heroku friendly: http://devcenter.heroku.com/articles/config-vars
|
13
|
+
#
|
14
|
+
# set :admin_user, ENV['COPY_USER']
|
15
|
+
# set :admin_password, ENV['COPY_PASSWORD']
|
16
|
+
|
17
|
+
# Enter the URL to your data store.
|
18
|
+
# "redis://", "mongodb://", "mysql://", "postgres://", and "sqlite://" are supported.
|
19
|
+
# Heroku friendly: http://devcenter.heroku.com/articles/mongohq
|
20
|
+
#
|
21
|
+
# set :storage, ENV['MONGOHQ_URL']
|
22
|
+
end
|
23
|
+
|
24
|
+
run Copy::Server
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<p>Welcome to your new <a href="https://github.com/javan/copy">Copy</a> site!</p>
|
data/lib/copy/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Javan Makhmali
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
type: :runtime
|
50
50
|
version_requirements: *id002
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
|
-
name:
|
52
|
+
name: choice
|
53
53
|
prerelease: false
|
54
54
|
requirement: &id003 !ruby/object:Gem::Requirement
|
55
55
|
none: false
|
@@ -60,13 +60,27 @@ dependencies:
|
|
60
60
|
segments:
|
61
61
|
- 0
|
62
62
|
version: "0"
|
63
|
-
type: :
|
63
|
+
type: :runtime
|
64
64
|
version_requirements: *id003
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: mocha
|
67
|
+
prerelease: false
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
77
|
+
type: :development
|
78
|
+
version_requirements: *id004
|
65
79
|
description: Serve mostly static pages with blocks of client-editable text.
|
66
80
|
email:
|
67
81
|
- javan@javan.us
|
68
|
-
executables:
|
69
|
-
|
82
|
+
executables:
|
83
|
+
- copy
|
70
84
|
extensions: []
|
71
85
|
|
72
86
|
extra_rdoc_files: []
|
@@ -77,6 +91,7 @@ files:
|
|
77
91
|
- LICENSE
|
78
92
|
- README.md
|
79
93
|
- Rakefile
|
94
|
+
- bin/copy
|
80
95
|
- copy.gemspec
|
81
96
|
- lib/copy.rb
|
82
97
|
- lib/copy/admin/copy.css
|
@@ -84,6 +99,17 @@ files:
|
|
84
99
|
- lib/copy/admin/index.html.erb
|
85
100
|
- lib/copy/admin/index.js.erb
|
86
101
|
- lib/copy/admin/jquery.js
|
102
|
+
- lib/copy/generators/site/Gemfile
|
103
|
+
- lib/copy/generators/site/config.ru
|
104
|
+
- lib/copy/generators/site/public/favicon.ico
|
105
|
+
- lib/copy/generators/site/public/images/.gitkeep
|
106
|
+
- lib/copy/generators/site/public/javascripts/.gitkeep
|
107
|
+
- lib/copy/generators/site/public/javascripts/main.js
|
108
|
+
- lib/copy/generators/site/public/robots.txt
|
109
|
+
- lib/copy/generators/site/public/stylesheets/.gitkeep
|
110
|
+
- lib/copy/generators/site/public/stylesheets/main.css
|
111
|
+
- lib/copy/generators/site/views/index.html.erb
|
112
|
+
- lib/copy/generators/site/views/layout.html.erb
|
87
113
|
- lib/copy/router.rb
|
88
114
|
- lib/copy/server.rb
|
89
115
|
- lib/copy/storage.rb
|