pandora-frameworks 0.1.2 → 0.1.3

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: 453e0ad6c882857b9b415ca20578c8c00e9b6ba9
4
- data.tar.gz: 53f7920178628a45698cd4f0fb5e825f74e39b2f
3
+ metadata.gz: 34703383760159fc6bb1b0aefff0d74f875bfb07
4
+ data.tar.gz: 38961102af85ec0245b7ebf1e7011476999989ab
5
5
  SHA512:
6
- metadata.gz: 65fd14b52f7a63bc6c5571a4ec1e8b53618079bbbf95a1deb0e43953091ddcf25c97d190853d0215a01188b7e58b06caf7d72948227e49aadc0d34c2c5d20fec
7
- data.tar.gz: 0208b1a9c85e361f4945ccaf9348479bd7a8f7e7ef6a80c0c14da378cd827383c076682810c283c561eaf4b10a87a1ba38c89cebdf5e53337ee892a53df0c1df
6
+ metadata.gz: 9ccded976522fea71eb29131801051f189a9d9a2c691216c7568e2ba97450bf4f7405d7abfd67c5f4b14eaf864d3b8edd2204043a7e2b963573c69851fc4693f
7
+ data.tar.gz: bceb733582f06812968f8ec0ca8a6f1e8937e680f392f536188a84184f9b09f6b6ef5d0c009832d00a5aa2bf4569ef85b297ff21a653b64ccfcf7dc3faba8cd4
@@ -1,5 +1,17 @@
1
+ osx_image: xcode8
1
2
  sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.3.0
5
- before_install: gem install bundler -v 1.13.1
3
+ notifications:
4
+ email: false
5
+ language: objective-c
6
+ service_name: travis-pro
7
+ repo_token: 9u4s2QLGYCvlB15SAqThI9eSY732ypUFz
8
+ before_install:
9
+ gem install bundler;
10
+ bundle install;
11
+ script:
12
+ bundle exec rake;
13
+ bundle exec exe/pandora create Cua org.test;
14
+ cd Cua;
15
+ make build;
16
+ make spec;
17
+
data/AUTHORS ADDED
@@ -0,0 +1,5 @@
1
+ Pandora would not be what it is today without the help of
2
+ the following kind souls:
3
+
4
+ Pedro Piñera
5
+ Raimon Lapuente
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in pandora.gemspec
4
3
  gemspec
data/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  ![headers](assets/header.png)
2
2
 
3
3
  [![Build Status](https://travis-ci.org/frameworkoriented/pandora.svg?branch=master)](https://travis-ci.org/frameworkoriented/pandora)
4
+ [![Coverage Status](https://coveralls.io/repos/github/frameworkoriented/pandora/badge.svg)](https://coveralls.io/github/frameworkoriented/pandora)
5
+ [![Gem Version](https://badge.fury.io/rb/pandora-frameworks.svg)](https://badge.fury.io/rb/pandora-frameworks)
6
+ [![Inline docs](http://inch-ci.org/github/frameworkoriented/pandora.svg?branch=master)](http://www.rubydoc.info/github/framework-oriented/pandora/master)
4
7
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pandora`. To experiment with that code, run `bin/console` for an interactive prompt.
6
-
7
- TODO: Delete this and the text above, and describe your gem
8
+ Pandora is a command line tool written in Ruby thought to make working with Frameworks easier.
9
+ If you haven't heard about it before, we recommend you to check out [frameworkoriented.io](frameworkoriented.io)
8
10
 
9
11
  ## Installation
10
12
 
@@ -29,7 +31,7 @@ Or install it yourself as:
29
31
  You can easily create a framework with the create command. It creates a framework project that includes an example project and an example playground:
30
32
 
31
33
  ```bash
32
- pandora create NAME
34
+ pandora create NAME ORGANIZATION
33
35
  ```
34
36
 
35
37
  ![headers](assets/example.png)
@@ -42,7 +44,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
42
44
 
43
45
  ## Contributing
44
46
 
45
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pandora. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
47
+ Bug reports and pull requests are welcome on GitHub at https://github.com/frameworkoriented/pandora. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
46
48
 
47
49
 
48
50
  ## License
@@ -12,12 +12,16 @@ module Pandora
12
12
  # @param [String] directory where the framework will be created.
13
13
  # @param [String] framework name.
14
14
  # @param [String] framework organization.
15
+ # @param [Bool] open the project once the command finishes.
16
+ # @param [Bool] verbose.
15
17
  # @return [Create] initialized command.
16
- def initialize(path, name, organization)
18
+ def initialize(path, name, organization, open_when_completed = false, verbose = true)
17
19
  @path = path
18
20
  @name = name
19
21
  @organization = organization
20
22
  @url = "https://github.com/frameworkoriented/template/archive/master.zip"
23
+ @open_when_completed = open_when_completed
24
+ @verbose = verbose
21
25
  end
22
26
 
23
27
  # Executes the command
@@ -26,25 +30,24 @@ module Pandora
26
30
  self.unzip_template
27
31
  self.rename_files(self.framework_path)
28
32
  self.rename_files_content
29
- puts "Enjoy #{@name} FRAMEWORK! #yatusabes".colorize(:light_yellow)
30
- system "pedropinerabuendia.xcuserdatad"
31
- system "open #{project_path}"
33
+ puts "Enjoy #{@name} FRAMEWORK! #yatusabes".colorize(:light_yellow) if @verbose
34
+ system "open #{project_path}" if @open_when_completed
32
35
  end
33
36
 
34
37
  protected
35
38
 
36
39
  def download_template
37
- puts "=> Downloading framework template".colorize(:green)
40
+ puts "=> Downloading framework template".colorize(:green) if @verbose
38
41
  response = RestClient.get(@url)
39
42
  File.delete(self.zip_path) if File.exist?(self.zip_path)
40
43
  zip_file = File.new(self.zip_path, "wb")
41
44
  zip_file << response.body
42
45
  zip_file.close
43
- puts "=> Framework template downloaded".colorize(:green)
46
+ puts "=> Framework template downloaded".colorize(:green) if @verbose
44
47
  end
45
48
 
46
49
  def unzip_template
47
- puts "=> Uncompressing template".colorize(:green)
50
+ puts "=> Uncompressing template".colorize(:green) if @verbose
48
51
  Zip::File.open(self.zip_path) do |zip_file|
49
52
  zip_file.each do |f|
50
53
  fpath = File.join(@path, f.name)
@@ -54,7 +57,7 @@ module Pandora
54
57
  FileUtils.remove(self.zip_path) if File.exist?(self.zip_path)
55
58
  FileUtils.remove_dir self.framework_path if File.exist?(self.framework_path)
56
59
  FileUtils.mv File.join(@path, "template-master"), self.framework_path
57
- puts '=> Template uncompressed'.colorize(:green)
60
+ puts '=> Template uncompressed'.colorize(:green) if @verbose
58
61
  end
59
62
 
60
63
  def rename_files(path)
@@ -68,7 +71,7 @@ module Pandora
68
71
  end
69
72
 
70
73
  def rename_files_content
71
- puts "=> Renaming files content".colorize(:green)
74
+ puts "=> Renaming files content".colorize(:green) if @verbose
72
75
  Dir[File.join(self.framework_path, "**/*")]
73
76
  .select { |fn| !File.directory?(fn) }
74
77
  .each do |file_path|
@@ -77,7 +80,7 @@ module Pandora
77
80
  new_contents = new_contents.gsub("YYYYY", @organization)
78
81
  File.open(file_path, "w") {|file| file.puts new_contents }
79
82
  end
80
- puts "=> Contents renamed".colorize(:green)
83
+ puts "=> Contents renamed".colorize(:green) if @verbose
81
84
  end
82
85
 
83
86
  def project_path
@@ -1,3 +1,3 @@
1
1
  module Pandora
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandora-frameworks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedro Piñera Buendía
@@ -189,6 +189,7 @@ files:
189
189
  - ".byebug_history"
190
190
  - ".gitignore"
191
191
  - ".travis.yml"
192
+ - AUTHORS
192
193
  - CODE_OF_CONDUCT.md
193
194
  - Gemfile
194
195
  - LICENSE.txt