mesmerize 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mesmerize (0.1.3)
4
+ mesmerize (0.1.4)
5
5
  commander (~> 4.1.2)
6
6
  faraday (~> 0.8.0)
7
7
  faraday_middleware (~> 0.8.7)
@@ -13,43 +13,41 @@ command :build do |c|
13
13
  require_authorization!
14
14
  validate_xcode_version!
15
15
 
16
- begin
17
- @xcodebuild_info = Mesmerize::XcodeBuildInfo.info
16
+ @xcodebuild_info = Mesmerize::XcodeBuildInfo.info
18
17
 
19
- @workspace = options.workspace
20
- @project = options.project
21
- @scheme = options.scheme
18
+ @workspace = options.workspace
19
+ @project = options.project
20
+ @scheme = options.scheme
22
21
 
23
- determine_workspace_or_project! unless @workspace || @project
22
+ determine_workspace_or_project! unless @workspace || @project
24
23
 
25
- determine_scheme! unless @scheme
26
- say_error "Scheme #{@scheme} not found" and abort unless @xcodebuild_info.schemes.include?(@scheme)
24
+ determine_scheme! unless @scheme
25
+ say_error "Scheme #{@scheme} not found" and abort unless @xcodebuild_info.schemes.include?(@scheme)
27
26
 
28
- say_warning "Building \"#{@workspace || @project}\" with scheme \"#{@scheme}\"\n" unless options.quiet
27
+ say_warning "Building \"#{@workspace || @project}\" with scheme \"#{@scheme}\"\n" unless options.quiet
29
28
 
30
- destination = File.join("/tmp/mesmerize/", "#{@xcodebuild_info.project}-#{Time.now.to_i}")
31
- log "xcodebuild", (@workspace || @project)
29
+ destination = File.join("/tmp/mesmerize/", "#{@xcodebuild_info.project}-#{Time.now.to_i}")
30
+ log "xcodebuild", (@workspace || @project)
32
31
 
33
- opts = []
34
- opts << "-workspace '#{@workspace}'" if @workspace
35
- opts << "-project '#{@project}'" if @project
36
- opts << "-scheme '#{@scheme}'" if @scheme
32
+ opts = []
33
+ opts << "-workspace '#{@workspace}'" if @workspace
34
+ opts << "-project '#{@project}'" if @project
35
+ opts << "-scheme '#{@scheme}'" if @scheme
37
36
 
38
- ["DSTROOT", "DWARF_DSYM_FOLDER_PATH", "CONFIGURATION_BUILD_DIR"].each do |k|
39
- opts << "#{k}=#{destination}"
40
- end
41
- opts << "DEPLOYMENT_LOCATION=YES"
37
+ ["DSTROOT", "DWARF_DSYM_FOLDER_PATH", "CONFIGURATION_BUILD_DIR"].each do |k|
38
+ opts << "#{k}=#{destination}"
39
+ end
40
+ opts << "DEPLOYMENT_LOCATION=YES"
42
41
 
43
- ENV['CC'] = nil # Fix for RVM
44
- abort unless system "xcodebuild -sdk macosx #{opts.join(' ')} clean build 1> /dev/null"
42
+ ENV['CC'] = nil # Fix for RVM
43
+ abort unless system "xcodebuild -sdk macosx #{opts.join(' ')} clean build 1> /dev/null"
45
44
 
46
- app = Dir["#{destination}/**/*.app"].detect{|app| File.basename(app, ".app") == @xcodebuild_info.project}
47
- say_error "Could not find build product in #{destination}" and abort unless app
45
+ filename = Dir["#{destination}/**/*.app"].detect{|app| File.basename(app, ".app") == @xcodebuild_info.project}
46
+ say_error "Could not find build product in #{destination}" and abort unless filename
48
47
 
49
- output = args.pop || "./"
50
- say_error "Could not move #{app} to #{output}" and abort unless system "mv #{app} #{output}"
51
- say_ok "#{File.basename(app)} successfully built" unless options.quiet
52
- end
48
+ output = args.pop || "./"
49
+ say_error "Could not move #{filename} to #{output}" and abort unless system "mv #{filename} #{output}"
50
+ say_ok "#{File.basename(filename)} successfully built" unless options.quiet
53
51
  end
54
52
 
55
53
  private
@@ -1,19 +1,24 @@
1
1
  command :create do |c|
2
- c.syntax = 'mesmerize create APP_NAME [options]'
2
+ c.syntax = 'mesmerize create APP_NAME'
3
3
  c.summary = 'Create a new app'
4
4
  c.description = ''
5
5
 
6
6
  c.action do |args, options|
7
- if @app = args[0]
8
- client.post_app(@app) do |status, body|
9
- if (200...300).include?(status)
10
- say_ok "Successfully created app, #{@app}"
11
- else
12
- say_error "Unable to create app: #{body}"
13
- end
7
+ @app = args.shift
8
+ determine_app_name! unless @app
9
+
10
+ client.post_app(@app) do |status, body|
11
+ if (200...300).include?(status)
12
+ say_ok "Successfully created app, #{@app}"
13
+ else
14
+ say_error "Unable to create app: #{body}"
14
15
  end
15
- else
16
- say_error "Missing argument: App Name"
17
16
  end
18
17
  end
18
+
19
+ private
20
+
21
+ def determine_app_name!
22
+ @app = ask "Enter app name:"
23
+ end
19
24
  end
data/lib/mesmerize.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Mesmerize
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
4
4
 
5
5
  $:.push File.expand_path('../', __FILE__)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mesmerize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-18 00:00:00.000000000Z
12
+ date: 2012-06-19 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70181270983740 !ruby/object:Gem::Requirement
16
+ requirement: &70346558697320 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.6.1
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70181270983740
24
+ version_requirements: *70346558697320
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &70181270983240 !ruby/object:Gem::Requirement
27
+ requirement: &70346558696820 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.9.2
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70181270983240
35
+ version_requirements: *70346558696820
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: commander
38
- requirement: &70181270982780 !ruby/object:Gem::Requirement
38
+ requirement: &70346558696360 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 4.1.2
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70181270982780
46
+ version_requirements: *70346558696360
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: json
49
- requirement: &70181270982320 !ruby/object:Gem::Requirement
49
+ requirement: &70346558695900 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.7.3
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70181270982320
57
+ version_requirements: *70346558695900
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: faraday
60
- requirement: &70181270981860 !ruby/object:Gem::Requirement
60
+ requirement: &70346558695440 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.8.0
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70181270981860
68
+ version_requirements: *70346558695440
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: faraday_middleware
71
- requirement: &70181270981400 !ruby/object:Gem::Requirement
71
+ requirement: &70346558694980 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.8.7
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70181270981400
79
+ version_requirements: *70346558694980
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: netrc
82
- requirement: &70181270980940 !ruby/object:Gem::Requirement
82
+ requirement: &70346558694520 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: 0.7.2
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70181270980940
90
+ version_requirements: *70346558694520
91
91
  description: Command-Line Interface for Mesmerize
92
92
  email: m@mattt.me
93
93
  executables:
@@ -109,9 +109,6 @@ files:
109
109
  - ./lib/mesmerize/commands.rb
110
110
  - ./lib/mesmerize/xcodebuildinfo.rb
111
111
  - ./lib/mesmerize.rb
112
- - ./mesmerize-0.1.0.gem
113
- - ./mesmerize-0.1.1.gem
114
- - ./mesmerize-0.1.2.gem
115
112
  - ./mesmerize.gemspec
116
113
  - ./Rakefile
117
114
  - ./README.md
@@ -130,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
130
127
  version: '0'
131
128
  segments:
132
129
  - 0
133
- hash: 2791860381221223865
130
+ hash: 2880016635781705436
134
131
  required_rubygems_version: !ruby/object:Gem::Requirement
135
132
  none: false
136
133
  requirements:
@@ -139,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
136
  version: '0'
140
137
  segments:
141
138
  - 0
142
- hash: 2791860381221223865
139
+ hash: 2880016635781705436
143
140
  requirements: []
144
141
  rubyforge_project:
145
142
  rubygems_version: 1.8.15
data/mesmerize-0.1.0.gem DELETED
Binary file
data/mesmerize-0.1.1.gem DELETED
Binary file
data/mesmerize-0.1.2.gem DELETED
Binary file