clearsight 1.0.0 → 1.1.0

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: 41a5c94b53546270f278fc1edbdda687e688117f
4
- data.tar.gz: d8492a2d1cc32cee1a66a892c53b959ee85e38f5
3
+ metadata.gz: 4e8f05fce77e79e7fd3ad25dcc8192db0af21761
4
+ data.tar.gz: d75c68f9eec1f268d5af0b2b3062c30dd0cd6b6b
5
5
  SHA512:
6
- metadata.gz: 5548a7ddb30016122befa529fc177ec10a8d2129fe1784ddcbb354793e388988d34b824ff9054889421d3a0c55faa531e58937bf2e40ce59056b8e5253741538
7
- data.tar.gz: c8ea30557cc86d4d92d7af0d2f785861be97084849880f44b27262a44efa04f58ba91c1cc37009c917df841429a495147b4642f5f7b802454e546d899ea89854
6
+ metadata.gz: 72d490fe33cd2e8d4997ac286c606504a49c641dd8d2487d1fd50769c0e53f3de407206ddf2ba1dcb868bee8112058671844027403edc16813321ab6528e5512
7
+ data.tar.gz: 3fe3d7e1dbe52416c6b00bdc7facb2247a5d59451d95e911386883bd384aeafcb9a19b0163ebdfcceeabcb3e52bbd13f1e96aa379c3f2bc868e4d2cf5b538704
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- clearsight (0.0.12)
4
+ clearsight (1.0.0)
5
5
  highline (~> 1.6.20)
6
6
  methadone (~> 1.3.0)
7
7
 
@@ -27,7 +27,7 @@ GEM
27
27
  multi_json (~> 1.3)
28
28
  highline (1.6.20)
29
29
  json (1.8.1)
30
- methadone (1.3.0)
30
+ methadone (1.3.1)
31
31
  bundler
32
32
  multi_json (1.8.2)
33
33
  multi_test (0.0.2)
data/README.md CHANGED
@@ -4,21 +4,76 @@ ClearSight Studio's swiss army knife. Common utilities for ClearSight Studio, a
4
4
 
5
5
  ## Installation
6
6
 
7
- Add this line to your application's Gemfile:
7
+ Install it:
8
8
 
9
- gem "clearsight", "~> 0.0.9"
9
+ $ gem install clearsight
10
10
 
11
- And then execute:
11
+ If you need `sudo`, it's probably because you're not using chruby or rvm properly.
12
12
 
13
- $ bundle
13
+ ## Usage
14
14
 
15
- Or install it yourself as:
15
+ ### Deploy
16
+
17
+ ```
18
+ cs deploy
19
+ ```
20
+
21
+ This is not implemented yet.
22
+
23
+ ### Update
24
+
25
+ ```
26
+ cs update
27
+ ```
28
+
29
+ Updates the clearsight gem.
30
+
31
+ ### Help
32
+
33
+ ```
34
+ cs help
35
+ ```
36
+
37
+ Displays help.
38
+
39
+ ### Kill Rails
40
+
41
+ ```
42
+ cs killrails <port>
43
+ ```
44
+
45
+ Kills any process running on port <port>, including rails servers.
46
+
47
+ ### SSHify
48
+
49
+ ```
50
+ cs sshify user@example.com
51
+ ```
52
+
53
+ Sets up remote SSH key on example.com for user.
54
+
55
+ ### Middleman
56
+
57
+ ```
58
+ cs mm new <appname>
59
+ ```
60
+
61
+ Makes a new Middleman project from the ClearSight template in the <appname> folder.
62
+
63
+ ### Symlink Xcode SDKs
64
+
65
+ ```
66
+ cs symlink_xcode_sdks
67
+ ```
68
+
69
+ Read [this blog post](http://blog.markrickert.me/crap-an-xcode-update-wiped-out-my-ios-6-sdk-again-2) for an explanation.
70
+
71
+ ### ...and more
72
+
73
+ More development on its way as we port our old shell scripts to this gem!
16
74
 
17
- $ gem install clearsight
18
75
 
19
- ## Usage
20
76
 
21
- TODO: Write usage instructions here
22
77
 
23
78
  ## Contributing
24
79
 
data/bin/cs CHANGED
@@ -19,6 +19,7 @@ class App
19
19
  when :killrails then killrails(args.first || 3000)
20
20
  when :sshify then sshify(args.first, options[:key] || "id_rsa.pub")
21
21
  when :mm then CS::Middleman.new(args).run
22
+ when :symlink_xcode_sdks then CS::Xcode.new(args).run
22
23
  else
23
24
  puts "Invalid command."
24
25
  show_help
data/lib/clearsight.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "clearsight/version"
2
2
  require "clearsight/deploy"
3
3
  require "clearsight/middleman"
4
+ require "clearsight/xcode"
4
5
  require 'thread'
5
6
 
6
7
  module Clearsight
@@ -1,3 +1,3 @@
1
1
  module Clearsight
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -0,0 +1,71 @@
1
+ # fix-xcode
2
+ # Mark Rickert <mjar81@gmail.com>
3
+
4
+ # Symlinks all your old SDKs to Xcode.app every time it is updated.
5
+ # Create a directory called /SDKs and run this script.
6
+ #
7
+ # Each time you upgrade Xcode, run fix-xcode.
8
+
9
+ # NOTE FROM JAMON: run `cs symlink_xcode_sdks` instead.
10
+
11
+ module Clearsight
12
+ class Xcode
13
+ def initialize(args)
14
+ @args = args
15
+ end
16
+
17
+ def run
18
+ display_banner
19
+
20
+ require 'FileUtils'
21
+
22
+ # Find all the SDKs in Xcode.app that aren't symlinks.
23
+ Dir.glob("#{xcode_path}/Platforms/*.platform/Developer/SDKs/*.sdk") do |sdk|
24
+ basename = sdk.split('/').last
25
+ if File.symlink?(sdk)
26
+ puts "#{basename} is already symlinked... skipping.\n"
27
+ next
28
+ end
29
+
30
+ puts "Processing: #{basename}\n"
31
+
32
+ # Remove the old version if it exists
33
+ destination = "#{sdk_path}/#{basename}"
34
+ if File.directory?(destination)
35
+ puts " - Removing existing SDK: #{destination}.\n"
36
+ FileUtils.rm_rf destination
37
+ end
38
+
39
+ puts " - Moving the Xcode version into place in #{sdk_path}.\n"
40
+ FileUtils.mv sdk, sdk_path
41
+ end
42
+
43
+ Dir.glob("#{sdk_path}/*.sdk") do |sdk|
44
+ sdk_name = sdk.split("/").last
45
+ sdk_platform = sdk_name.match(/[a-zA-Z]{3,}/)[0]
46
+
47
+ ln_dest = "#{xcode_path}/Platforms/#{sdk_platform}.platform/Developer/SDKs/#{sdk_name}"
48
+ puts " - Symlinking #{sdk_platform}.\n"
49
+
50
+ FileUtils.ln_sf sdk, ln_dest
51
+ end
52
+
53
+ puts "\nDone! Your SDKs now live in #{sdk_path} and are symlinked properly into the Xcode.app.\n\n"
54
+ end
55
+
56
+ def xcode_path
57
+ `xcode-select --print-path`.chomp
58
+ end
59
+
60
+ def sdk_path
61
+ "/SDKs"
62
+ end
63
+
64
+ def display_banner
65
+ # Nice little banner
66
+ puts "-" * 29
67
+ puts "Running Fixing Xcode.app SDK Paths."
68
+ puts "-" * 29
69
+ end
70
+ end
71
+ end
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: 1.0.0
4
+ version: 1.1.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-30 00:00:00.000000000 Z
11
+ date: 2013-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -131,6 +131,7 @@ files:
131
131
  - lib/clearsight/deploy.rb
132
132
  - lib/clearsight/middleman.rb
133
133
  - lib/clearsight/version.rb
134
+ - lib/clearsight/xcode.rb
134
135
  - test/tc_something.rb
135
136
  homepage: http://www.clearsightstudio.com
136
137
  licenses:
@@ -152,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
153
  version: '0'
153
154
  requirements: []
154
155
  rubyforge_project:
155
- rubygems_version: 2.1.9
156
+ rubygems_version: 2.1.11
156
157
  signing_key:
157
158
  specification_version: 4
158
159
  summary: Common utilities for ClearSight Studio, a web and mobile app development