rusic 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +35 -5
- data/lib/rusic/cli.rb +21 -7
- data/lib/rusic/generators/theme.rb +4 -0
- data/lib/rusic/templates/gitignore +1 -0
- data/lib/rusic/version.rb +1 -1
- data/rusic.gemspec +5 -7
- metadata +14 -38
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f70c8fd8612e0b964d55854a9efebe37ce213e41
|
4
|
+
data.tar.gz: cc3f8714e70a366827541dcb13d32bc5af0d8888
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07f93568fcde7178abd42d052aea34c4869de0a347a9e8a96d80904217d90dc183b49d8e9b01c4721e733b29e4fdc8e8f4ad7714d8bc1780c5316989acc2d88f
|
7
|
+
data.tar.gz: f98a7df8e9a09018d83cdf485d54422f38aa5779d1c2485f8aec1bf69682014aafcfc144878c5111588cb78f9f8f194ff2a05792941c70593cbe373687e82735
|
data/README.md
CHANGED
@@ -24,10 +24,11 @@ choice) and see the changes live on Rusic immediately.
|
|
24
24
|
```
|
25
25
|
$ rusic
|
26
26
|
Tasks:
|
27
|
-
rusic help [TASK]
|
28
|
-
rusic new NAME
|
29
|
-
rusic deploy
|
30
|
-
rusic
|
27
|
+
rusic help [TASK] # Describe available tasks or one specific task
|
28
|
+
rusic new NAME # Create a new Rusic theme
|
29
|
+
rusic deploy [ENV] # Upload theme to Rusic
|
30
|
+
rusic settings # Display settings from a .rusic file
|
31
|
+
rusic version # Display version of Rusic gem
|
31
32
|
```
|
32
33
|
|
33
34
|
### Generate new theme
|
@@ -72,7 +73,7 @@ This will create a simple, bootstrapped theme
|
|
72
73
|
```shell
|
73
74
|
$ rusic help deploy
|
74
75
|
Usage:
|
75
|
-
rusic deploy
|
76
|
+
rusic deploy [ENV]
|
76
77
|
|
77
78
|
Options:
|
78
79
|
[--api-key=API_KEY]
|
@@ -113,6 +114,35 @@ $ touch layouts/subdomain.html.liquid # in another process
|
|
113
114
|
Saved layouts/subdomain.html.liquid
|
114
115
|
```
|
115
116
|
|
117
|
+
### Deploy using a `.rusic` file
|
118
|
+
|
119
|
+
You can add a `rusic.yml` file to your project directory and set your environments
|
120
|
+
settings within this file. This file should be valid
|
121
|
+
[YAML](http://www.yaml.org/start.html) and looks like this -
|
122
|
+
|
123
|
+
```yaml
|
124
|
+
#
|
125
|
+
api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
126
|
+
stage:
|
127
|
+
theme: 2
|
128
|
+
production:
|
129
|
+
api_key: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
|
130
|
+
theme: 1
|
131
|
+
```
|
132
|
+
|
133
|
+
To deploy to production you need to run
|
134
|
+
|
135
|
+
```shell
|
136
|
+
$ rusic deploy production
|
137
|
+
```
|
138
|
+
|
139
|
+
This also works with `--watch`
|
140
|
+
|
141
|
+
|
142
|
+
```shell
|
143
|
+
$ rusic deploy production --watch
|
144
|
+
```
|
145
|
+
|
116
146
|
MIT Licenced
|
117
147
|
|
118
148
|
Copyright © 2011–2014, Simpleweb Ltd.
|
data/lib/rusic/cli.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'thor'
|
2
2
|
require 'pathname'
|
3
3
|
require 'filewatcher'
|
4
|
+
require 'yaml'
|
4
5
|
|
5
6
|
module Rusic
|
6
7
|
class CLI < Thor
|
@@ -9,30 +10,30 @@ module Rusic
|
|
9
10
|
Rusic::Generators::Theme.start([name])
|
10
11
|
end
|
11
12
|
|
12
|
-
desc "deploy", "Upload theme to Rusic"
|
13
|
+
desc "deploy [ENV]", "Upload theme to Rusic"
|
13
14
|
method_option :api_key, type: :string
|
14
15
|
method_option :api_host, type: :string, default: 'api.rusic.com'
|
15
16
|
method_option :theme, type: :string
|
16
17
|
method_option :watch, type: :boolean
|
17
|
-
|
18
|
-
|
18
|
+
|
19
|
+
def deploy(env = nil)
|
20
|
+
path = Pathname.new(Dir.pwd)
|
19
21
|
files = []
|
20
22
|
|
21
23
|
files << Dir.glob(path.join('{layouts,ideas,pages}', '*.liquid'))
|
22
24
|
files << Dir.glob(path.join('assets', '*.*'))
|
23
25
|
|
24
26
|
files.flatten!
|
25
|
-
|
26
|
-
if options[:watch]
|
27
|
+
if options['watch']
|
27
28
|
FileWatcher.new(%w[layouts/ ideas/ pages/ assets/]).watch(0.5) do |file, event|
|
28
29
|
unless event == :delete
|
29
30
|
deployer = Rusic::Deployer.new(file)
|
30
|
-
deployer.upload_files(
|
31
|
+
deployer.upload_files(deploy_options_for(env))
|
31
32
|
end
|
32
33
|
end
|
33
34
|
else
|
34
35
|
deployer = Rusic::Deployer.new(files)
|
35
|
-
deployer.upload_files(
|
36
|
+
deployer.upload_files(deploy_options_for(env))
|
36
37
|
end
|
37
38
|
end
|
38
39
|
|
@@ -40,5 +41,18 @@ module Rusic
|
|
40
41
|
def version
|
41
42
|
puts Rusic::VERSION
|
42
43
|
end
|
44
|
+
|
45
|
+
private
|
46
|
+
|
47
|
+
def deploy_options_for(env)
|
48
|
+
environment_options = options_from_file
|
49
|
+
environment_options.merge!(options_from_file.fetch(env, {}))
|
50
|
+
Thor::CoreExt::HashWithIndifferentAccess.new(environment_options.merge(options))
|
51
|
+
end
|
52
|
+
|
53
|
+
def options_from_file
|
54
|
+
config_file = Dir.glob(File.join(Dir.pwd, '.rusic{,.yml,.yaml}')).first
|
55
|
+
::YAML::load_file(config_file) || {}
|
56
|
+
end
|
43
57
|
end
|
44
58
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
.rusic*
|
data/lib/rusic/version.rb
CHANGED
data/rusic.gemspec
CHANGED
@@ -6,9 +6,9 @@ require 'rusic/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "rusic"
|
8
8
|
spec.version = Rusic::VERSION
|
9
|
-
spec.authors = ['Chris Mytton', 'Paul Springett']
|
10
|
-
spec.email = ['self@hecticjeff.net', 'paul@simpleweb.co.uk']
|
11
|
-
spec.description = 'Theme creation and deployment'
|
9
|
+
spec.authors = ['Chris Mytton', 'Paul Springett', 'Adam Butler', 'Peter Rhoades']
|
10
|
+
spec.email = ['self@hecticjeff.net', 'paul@simpleweb.co.uk', 'adam@lab.io', 'createdbypete@gmail.com']
|
11
|
+
spec.description = 'Theme creation and deployment for the Rusic platform'
|
12
12
|
spec.summary = 'Generate and deploy themes to Rusic'
|
13
13
|
spec.homepage = 'http://developer.rusic.com/'
|
14
14
|
spec.license = "MIT"
|
@@ -18,12 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_runtime_dependency 'thor', '~> 0.14
|
21
|
+
spec.add_runtime_dependency 'thor', '~> 0.14'
|
22
22
|
spec.add_runtime_dependency 'rest-client', '~> 1.6'
|
23
23
|
spec.add_runtime_dependency 'filewatcher', '~> 0.3'
|
24
24
|
spec.add_runtime_dependency 'command_line_reporter', '~> 3.3'
|
25
25
|
|
26
|
-
spec.add_development_dependency 'rake'
|
27
|
-
spec.add_development_dependency 'rspec', '~> 2.6.0'
|
28
|
-
spec.add_development_dependency 'rack-test', '~> 0.6'
|
26
|
+
spec.add_development_dependency 'rake'
|
29
27
|
end
|
metadata
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rusic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Mytton
|
8
8
|
- Paul Springett
|
9
|
+
- Adam Butler
|
10
|
+
- Peter Rhoades
|
9
11
|
autorequire:
|
10
12
|
bindir: bin
|
11
13
|
cert_chain: []
|
12
|
-
date: 2014-
|
14
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
13
15
|
dependencies:
|
14
16
|
- !ruby/object:Gem::Dependency
|
15
17
|
name: thor
|
@@ -17,14 +19,14 @@ dependencies:
|
|
17
19
|
requirements:
|
18
20
|
- - "~>"
|
19
21
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.14
|
22
|
+
version: '0.14'
|
21
23
|
type: :runtime
|
22
24
|
prerelease: false
|
23
25
|
version_requirements: !ruby/object:Gem::Requirement
|
24
26
|
requirements:
|
25
27
|
- - "~>"
|
26
28
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.14
|
29
|
+
version: '0.14'
|
28
30
|
- !ruby/object:Gem::Dependency
|
29
31
|
name: rest-client
|
30
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -71,55 +73,28 @@ dependencies:
|
|
71
73
|
name: rake
|
72
74
|
requirement: !ruby/object:Gem::Requirement
|
73
75
|
requirements:
|
74
|
-
- - "
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: 0.9.0
|
77
|
-
type: :development
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- - "~>"
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version: 0.9.0
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: rspec
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
87
|
-
requirements:
|
88
|
-
- - "~>"
|
76
|
+
- - ">="
|
89
77
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
78
|
+
version: '0'
|
91
79
|
type: :development
|
92
80
|
prerelease: false
|
93
81
|
version_requirements: !ruby/object:Gem::Requirement
|
94
82
|
requirements:
|
95
|
-
- - "
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: 2.6.0
|
98
|
-
- !ruby/object:Gem::Dependency
|
99
|
-
name: rack-test
|
100
|
-
requirement: !ruby/object:Gem::Requirement
|
101
|
-
requirements:
|
102
|
-
- - "~>"
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: '0.6'
|
105
|
-
type: :development
|
106
|
-
prerelease: false
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
requirements:
|
109
|
-
- - "~>"
|
83
|
+
- - ">="
|
110
84
|
- !ruby/object:Gem::Version
|
111
|
-
version: '0
|
112
|
-
description: Theme creation and deployment
|
85
|
+
version: '0'
|
86
|
+
description: Theme creation and deployment for the Rusic platform
|
113
87
|
email:
|
114
88
|
- self@hecticjeff.net
|
115
89
|
- paul@simpleweb.co.uk
|
90
|
+
- adam@lab.io
|
91
|
+
- createdbypete@gmail.com
|
116
92
|
executables:
|
117
93
|
- rusic
|
118
94
|
extensions: []
|
119
95
|
extra_rdoc_files: []
|
120
96
|
files:
|
121
97
|
- ".gitignore"
|
122
|
-
- ".ruby-version"
|
123
98
|
- Gemfile
|
124
99
|
- MIT-LICENCE
|
125
100
|
- README.md
|
@@ -137,6 +112,7 @@ files:
|
|
137
112
|
- lib/rusic/templates/assets/glyphicons-halflings-regular.svg
|
138
113
|
- lib/rusic/templates/assets/glyphicons-halflings-regular.ttf
|
139
114
|
- lib/rusic/templates/assets/glyphicons-halflings-regular.woff
|
115
|
+
- lib/rusic/templates/gitignore
|
140
116
|
- lib/rusic/templates/ideas/edit.html.liquid
|
141
117
|
- lib/rusic/templates/ideas/index.html.liquid
|
142
118
|
- lib/rusic/templates/ideas/new.html.liquid
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.1.1
|