ognivo 0.0.1 → 0.0.2

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: 889f43c8d630e634474055e081089c1dc8c9b4f9
4
- data.tar.gz: a7b60eec0a81b8b0567cb96dc5dbef80e8642039
3
+ metadata.gz: 92a20aed7af529b09b1e7c5bd83e3fd89c199206
4
+ data.tar.gz: 35a0ee3a07c6a53c4b17e194a44855bb516f18c5
5
5
  SHA512:
6
- metadata.gz: 4d0f0193fc3a57686bab29604a369635e2baaa5a860e1de07d561952c426b98cb6250c38452f8adfdd3c77b97cfab064ef6bc822d2b9d62455840d029911e830
7
- data.tar.gz: bd6120a79231e77962f254874268caeadde9bb9ac4f32a7c081bdc783a1fadc4a68800c2863f87feabecd7c70c8f10745f99d558e7508e864f6bb4f42f7da78e
6
+ metadata.gz: 59988a1b2eb5d28841b075194837e7f4a854610765e053ea250da959c70f330a5a8b6359e45ce042577c0b65a92510c480352d05c603e983b4a29f4fb1a65c42
7
+ data.tar.gz: d992bff5a7530fac6c1cee9ea4bfa0a35c1d659dd02ffc3aae8b47ca177757a5c43e7eac1a7aaf0078e53f694fec91aba4d1f147d659bb0f4972fe75e687d148
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Ognivo
2
2
 
3
- Automates MacOS app updates distributing using the [Sparkle project](https://github.com/sparkle-project/Sparkle) and [Amazon S3](http://aws.amazon.com/s3/).
3
+ [![Code Climate](http://img.shields.io/codeclimate/github/antlypls/ognivo.svg?style=flat)](https://codeclimate.com/github/antlypls/ognivo)
4
+ [![Build Status](http://img.shields.io/travis/antlypls/ognivo.svg?style=flat)](https://travis-ci.org/antlypls/ognivo)
5
+
6
+ Create MacOS app builds and destribute updates with [Sparkle](https://github.com/sparkle-project/Sparkle) over [Amazon S3](http://aws.amazon.com/s3/).
4
7
 
5
8
  > **NOTE** about gem's name:
6
9
  > *ognivo* is a russian word that means *fire striker*,
data/lib/ognivo/build.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'xctools'
2
+
1
3
  module Ognivo
2
4
  class Build
3
5
  include CLIHelpers
@@ -18,7 +20,7 @@ module Ognivo
18
20
  end
19
21
 
20
22
  def build_version
21
- @build_version ||= Agvtool.marketing_version.to_s
23
+ @build_version ||= XcTools::Agvtool.marketing_version.to_s
22
24
  end
23
25
 
24
26
  attr_reader :zip_file
@@ -31,13 +33,13 @@ module Ognivo
31
33
  end
32
34
 
33
35
  def collect_settings
34
- build_info = XcodeBuild.info(workspace: @workspace, project: @project)
36
+ build_info = XcTools::XcodeBuild.info(workspace: @workspace, project: @project)
35
37
 
36
38
  ensure_workspace_project
37
39
 
38
40
  @scheme = select_option('scheme', build_info.schemes) unless @scheme
39
41
 
40
- build_settings = XcodeBuild.settings(*build_flags).find_app
42
+ build_settings = XcTools::XcodeBuild.settings(*build_flags).find_app
41
43
  validate_settings(build_settings)
42
44
 
43
45
  @build_configuration ||= build_settings['CONFIGURATION']
data/lib/ognivo/cli.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # program :name, 'ognivo'
2
2
  program :version, Ognivo::VERSION
3
- program :description, 'Automates MacOS app updates publishing using sparkle and S3'
3
+ program :description, 'Build and publish MacOS apps updates with sparkle and S3'
4
4
 
5
5
  program :help, 'Author', 'Anatoliy Plastinin <hello@antlypls.com>'
6
6
  program :help, 'Website', 'http://github.com/antlypls/ognivo'
@@ -1,3 +1,3 @@
1
1
  module Ognivo
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
data/lib/ognivo.rb CHANGED
@@ -2,8 +2,6 @@ require 'ognivo/version'
2
2
 
3
3
  require 'ognivo/appcast'
4
4
  require 'ognivo/utils'
5
- require 'ognivo/xcodebuild'
6
- require 'ognivo/agvtool'
7
5
 
8
6
  require 'ognivo/cli_helpers'
9
7
  require 'ognivo/build'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ognivo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anatoliy Plastinin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-12 00:00:00.000000000 Z
11
+ date: 2014-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: xctools
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: nokogiri
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -80,8 +94,8 @@ dependencies:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
96
  version: '1.6'
83
- description: Ognivo is CLI tool that automates publishing of MacOS application updates
84
- using sparkle by AWS S3
97
+ description: Ognivo is CLI tool that automates creating MacOS app builds and destributing
98
+ updates with Sparkle over Amazon S3.
85
99
  email:
86
100
  - hello@antlypls.com
87
101
  executables:
@@ -93,7 +107,6 @@ files:
93
107
  - README.md
94
108
  - bin/spark
95
109
  - lib/ognivo.rb
96
- - lib/ognivo/agvtool.rb
97
110
  - lib/ognivo/appcast.rb
98
111
  - lib/ognivo/build.rb
99
112
  - lib/ognivo/cli.rb
@@ -106,8 +119,7 @@ files:
106
119
  - lib/ognivo/upload.rb
107
120
  - lib/ognivo/utils.rb
108
121
  - lib/ognivo/version.rb
109
- - lib/ognivo/xcodebuild.rb
110
- homepage: ''
122
+ homepage: https://github.com/antlypls/ognivo
111
123
  licenses:
112
124
  - MIT
113
125
  metadata: {}
@@ -1,8 +0,0 @@
1
- module Ognivo
2
- module Agvtool
3
- def self.marketing_version
4
- output = `agvtool what-marketing-version -terse`
5
- output.scan(/\=(.+)$/).flatten.first
6
- end
7
- end
8
- end
@@ -1,113 +0,0 @@
1
- # based on source code from nomad/shenzhen project
2
- # see https://github.com/nomad/shenzhen/blob/master/lib/shenzhen/xcodebuild.rb
3
-
4
- require 'ostruct'
5
-
6
- module Ognivo
7
- module XcodeBuild
8
- Error = Class.new(StandardError)
9
- NilOutputError = Class.new(Error)
10
-
11
- Info = Class.new(OpenStruct)
12
-
13
- class Settings < Hash
14
- def initialize(hash = {})
15
- merge!(hash)
16
- end
17
-
18
- def find_app
19
- values.find { |settings| settings['WRAPPER_EXTENSION'] == 'app' }
20
- end
21
- end
22
-
23
- def self.info(*args)
24
- options = args.last.is_a?(Hash) ? args.pop : {}
25
- output = `xcodebuild -list #{(args + args_from_options(options)).join(' ')} 2>&1`
26
- fail Error, $1 if output =~ /^xcodebuild\: error\: (.+)$/
27
- fail NilOutputError unless output =~ /\S/
28
-
29
- info = parse_info_output(output)
30
- Info.new(info)
31
- end
32
-
33
- def self.parse_info_output(output)
34
- lines = output.split(/\n/)
35
-
36
- project_name = parse_info_project_name(lines.first)
37
-
38
- info, _ = lines.drop(1).reduce([{}, nil]) do |(info, group), line|
39
- parse_info_line(line, info, group)
40
- end
41
-
42
- info.each do |_, values|
43
- values.delete('')
44
- values.uniq!
45
- end
46
-
47
- info.merge(project: project_name)
48
- end
49
-
50
- def self.parse_info_project_name(line)
51
- $1 if line =~ /\"(.+)\"\:/
52
- end
53
-
54
- def self.parse_info_line(line, info, group)
55
- if line =~ /\:$/
56
- group = line.strip[0...-1].downcase.gsub(/\s+/, '_')
57
- info[group] = []
58
- else
59
- info[group] << line.strip unless group.nil? || line =~ /\.$/
60
- end
61
-
62
- [info, group]
63
- end
64
- private_class_method :parse_info_line
65
-
66
- def self.settings(*args)
67
- options = args.last.is_a?(Hash) ? args.pop : {}
68
- cmd_args = (args + args_from_options(options)).join(' ')
69
- output = `xcodebuild #{cmd_args} -showBuildSettings 2> /dev/null`
70
- fail Error, $1 if output =~ /^xcodebuild\: error\: (.+)$/
71
- fail NilOutputError unless output =~ /\S/
72
-
73
- settings = parse_settings_output(output)
74
- Settings.new(settings)
75
- end
76
-
77
- def self.parse_settings_output(output)
78
- lines = output.split(/\n/)
79
-
80
- lines.reduce([{}, nil]) do |(settings, target), line|
81
- parse_settings_line(line, settings, target)
82
- end.first
83
- end
84
-
85
- def self.parse_settings_line(line, settings, target)
86
- case line
87
- when /Build settings for action build and target \"?([^":]+)/
88
- target = $1
89
- settings[target] = {}
90
- else
91
- key, value = line.split(/\=/).map(&:strip)
92
- settings[target][key] = value if target
93
- end
94
-
95
- [settings, target]
96
- end
97
- private_class_method :parse_settings_line
98
-
99
- def self.version
100
- output = `xcodebuild -version`
101
- parse_xcode_version(output)
102
- end
103
-
104
- def self.parse_xcode_version(output)
105
- $1 if output =~ /([\d+\.?]+)/
106
- end
107
-
108
- def self.args_from_options(options = {})
109
- options.reject { |_, value| value.nil? }.map { |key, value| "-#{key} '#{value}'" }
110
- end
111
- private_class_method :args_from_options
112
- end
113
- end