clearsight 0.0.12 → 1.0.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4607e294ad173a6273284c3ecc22d2196ff75c6c
4
- data.tar.gz: 80d4b336b219c27781769874418aabdbc302373f
3
+ metadata.gz: 41a5c94b53546270f278fc1edbdda687e688117f
4
+ data.tar.gz: d8492a2d1cc32cee1a66a892c53b959ee85e38f5
5
5
  SHA512:
6
- metadata.gz: a1ce7469ab507451839cd560a6e7eb0e321f0f959dbdf7ef729c8bccbb962a5f58936d2b07af907c35e16a5665fd0120d506407cff5636ce13d617883105374f
7
- data.tar.gz: 23ad3bf52290dc85bcb1090c41ca58715bad4ccb09d013499910461321b0b13a4feae314a58e4c337380f328cfd6907a0be1426d8ec15ad16d0aeec1a3a048a9
6
+ metadata.gz: 5548a7ddb30016122befa529fc177ec10a8d2129fe1784ddcbb354793e388988d34b824ff9054889421d3a0c55faa531e58937bf2e40ce59056b8e5253741538
7
+ data.tar.gz: c8ea30557cc86d4d92d7af0d2f785861be97084849880f44b27262a44efa04f58ba91c1cc37009c917df841429a495147b4642f5f7b802454e546d899ea89854
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- clearsight (0.0.8)
4
+ clearsight (0.0.12)
5
5
  highline (~> 1.6.20)
6
6
  methadone (~> 1.3.0)
7
7
 
data/bin/cs CHANGED
@@ -18,6 +18,7 @@ class App
18
18
  when :help then show_help
19
19
  when :killrails then killrails(args.first || 3000)
20
20
  when :sshify then sshify(args.first, options[:key] || "id_rsa.pub")
21
+ when :mm then CS::Middleman.new(args).run
21
22
  else
22
23
  puts "Invalid command."
23
24
  show_help
@@ -34,6 +35,8 @@ class App
34
35
  puts " Kills a rails server running on the given port. Only works on Linux (so far)."
35
36
  puts " sshify host <-k keyname.pub>"
36
37
  puts " Installs your SSH public key (id_rsa.pub unless you pass a different one) to a remote server (user@host.com)."
38
+ puts " mm <project>"
39
+ puts " Initializes a middleman project with the given project name using the ClearSight template."
37
40
  puts " update"
38
41
  puts " Updates the gem. Same as `gem update clearsight`."
39
42
  end
@@ -45,7 +48,7 @@ class App
45
48
  end
46
49
  puts "done."
47
50
  end
48
-
51
+
49
52
  def self.killrails(port)
50
53
  print "Killing Rails."
51
54
  start_progress do
@@ -53,7 +56,7 @@ class App
53
56
  end
54
57
  puts "dead."
55
58
  end
56
-
59
+
57
60
  def self.sshify(host, keyname)
58
61
  puts "Installing SSH key to remote server."
59
62
  sh "cat ~/.ssh/#{keyname} | ssh #{host} 'cat >> ~/.ssh/authorized_keys'"
@@ -65,9 +68,9 @@ class App
65
68
  yield
66
69
  @t.stop
67
70
  end
68
-
71
+
69
72
  arg :args, :optional
70
-
73
+
71
74
  version Clearsight::VERSION
72
75
 
73
76
  use_log_level_option
@@ -0,0 +1,47 @@
1
+ module Clearsight
2
+ class Middleman
3
+ include Methadone::CLILogging
4
+ include Methadone::SH
5
+
6
+ attr_accessor :args
7
+
8
+ def initialize(args)
9
+ @args = args
10
+ end
11
+
12
+ def run
13
+ if @args.first == "new"
14
+ create @args[1]
15
+ else
16
+ pass
17
+ end
18
+ end
19
+
20
+ def pass
21
+ sh "middleman #{@args.join(' ')}"
22
+ end
23
+
24
+ def setup
25
+ File.exist?("#{ENV['HOME']}/.middleman/clearsight") ? update : clone
26
+ end
27
+
28
+ def clone
29
+ print "Cloning ClearSight middleman template..."
30
+ sh "git clone git@bitbucket.org:clearsightstudio/middleman-template.git ~/.middleman/clearsight"
31
+ puts "done."
32
+ end
33
+
34
+ def update
35
+ print "Updating ClearSight middleman template..."
36
+ sh "cd ~/.middleman/clearsight && git pull && cd -"
37
+ puts "done."
38
+ end
39
+
40
+ def create(project)
41
+ setup
42
+ print "Setting up new middleman project..."
43
+ sh "middleman init -T=clearsight #{project}"
44
+ puts "done."
45
+ end
46
+ end
47
+ end
@@ -1,3 +1,3 @@
1
1
  module Clearsight
2
- VERSION = "0.0.12"
2
+ VERSION = "1.0.0"
3
3
  end
data/lib/clearsight.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "clearsight/version"
2
2
  require "clearsight/deploy"
3
+ require "clearsight/middleman"
3
4
  require 'thread'
4
5
 
5
6
  module Clearsight
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clearsight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamon Holmgren
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-25 00:00:00.000000000 Z
11
+ date: 2013-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -129,6 +129,7 @@ files:
129
129
  - features/support/env.rb
130
130
  - lib/clearsight.rb
131
131
  - lib/clearsight/deploy.rb
132
+ - lib/clearsight/middleman.rb
132
133
  - lib/clearsight/version.rb
133
134
  - test/tc_something.rb
134
135
  homepage: http://www.clearsightstudio.com
@@ -151,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
152
  version: '0'
152
153
  requirements: []
153
154
  rubyforge_project:
154
- rubygems_version: 2.0.3
155
+ rubygems_version: 2.1.9
155
156
  signing_key:
156
157
  specification_version: 4
157
158
  summary: Common utilities for ClearSight Studio, a web and mobile app development