vipergen-xctestable 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +157 -0
- data/bin/vipergen +9 -0
- data/lib/templates/default/objc/DataManager/API/VIPERAPIDataManager.h +12 -0
- data/lib/templates/default/objc/DataManager/API/VIPERAPIDataManager.m +10 -0
- data/lib/templates/default/objc/DataManager/Local/VIPERLocalDataManager.h +12 -0
- data/lib/templates/default/objc/DataManager/Local/VIPERLocalDataManager.m +10 -0
- data/lib/templates/default/objc/Interactor/VIPERInteractor.h +16 -0
- data/lib/templates/default/objc/Interactor/VIPERInteractor.m +10 -0
- data/lib/templates/default/objc/Interactor/VIPERItem.h +10 -0
- data/lib/templates/default/objc/Interactor/VIPERItem.m +10 -0
- data/lib/templates/default/objc/Presenter/VIPERPresenter.h +17 -0
- data/lib/templates/default/objc/Presenter/VIPERPresenter.m +11 -0
- data/lib/templates/default/objc/Protocols/VIPERProtocols.h +80 -0
- data/lib/templates/default/objc/View/VIPERView.h +13 -0
- data/lib/templates/default/objc/View/VIPERView.m +32 -0
- data/lib/templates/default/objc/WireFrame/VIPERWireFrame.h +18 -0
- data/lib/templates/default/objc/WireFrame/VIPERWireFrame.m +32 -0
- data/lib/templates/default/swift/DataManager/API/VIPERAPIDataManager.swift +11 -0
- data/lib/templates/default/swift/DataManager/Local/VIPERLocalDataManager.swift +11 -0
- data/lib/templates/default/swift/Interactor/VIPERInteractor.swift +15 -0
- data/lib/templates/default/swift/Interactor/VIPERItem.swift +13 -0
- data/lib/templates/default/swift/Presenter/VIPERPresenter.swift +15 -0
- data/lib/templates/default/swift/Protocols/VIPERProtocols.swift +70 -0
- data/lib/templates/default/swift/View/VIPERView.swift +12 -0
- data/lib/templates/default/swift/WireFrame/VIPERWireFrame.swift +29 -0
- data/lib/templates/default/viperspec.yml +4 -0
- data/lib/templates/testable/objc/DataManager/VIPERDataManager.h +15 -0
- data/lib/templates/testable/objc/DataManager/VIPERDataManager.m +11 -0
- data/lib/templates/testable/objc/Interactor/VIPERInteractor.h +16 -0
- data/lib/templates/testable/objc/Interactor/VIPERInteractor.m +10 -0
- data/lib/templates/testable/objc/Interactor/VIPERInteractorSpec.m +31 -0
- data/lib/templates/testable/objc/Presenter/VIPERPresenter.h +18 -0
- data/lib/templates/testable/objc/Presenter/VIPERPresenter.m +11 -0
- data/lib/templates/testable/objc/Presenter/VIPERPresenterSpec.m +31 -0
- data/lib/templates/testable/objc/Protocols/VIPERProtocols.h +64 -0
- data/lib/templates/testable/objc/ViewController/VIPERViewController.h +13 -0
- data/lib/templates/testable/objc/ViewController/VIPERViewController.m +32 -0
- data/lib/templates/testable/objc/ViewController/VIPERViewControllerSpec.m +31 -0
- data/lib/templates/testable/objc/WireFrame/VIPERWireFrame.h +19 -0
- data/lib/templates/testable/objc/WireFrame/VIPERWireFrame.m +31 -0
- data/lib/templates/testable/swift/DataManager/API/VIPERAPIDataManager.swift +11 -0
- data/lib/templates/testable/swift/DataManager/Local/VIPERLocalDataManager.swift +11 -0
- data/lib/templates/testable/swift/Interactor/VIPERInteractor.swift +15 -0
- data/lib/templates/testable/swift/Interactor/VIPERInteractorSpec.swift +22 -0
- data/lib/templates/testable/swift/Presenter/VIPERPresenter.swift +15 -0
- data/lib/templates/testable/swift/Presenter/VIPERPresenterSpec.swift +22 -0
- data/lib/templates/testable/swift/Protocols/VIPERProtocols.swift +70 -0
- data/lib/templates/testable/swift/View/VIPERView.swift +12 -0
- data/lib/templates/testable/swift/View/VIPERViewSpec.swift +22 -0
- data/lib/templates/testable/swift/WireFrame/VIPERWireFrame.swift +31 -0
- data/lib/templates/testable/viperspec.yml +4 -0
- data/lib/templates/xctestable/objc/DataManager/VIPERDataManager.h +15 -0
- data/lib/templates/xctestable/objc/DataManager/VIPERDataManager.m +11 -0
- data/lib/templates/xctestable/objc/Interactor/VIPERInteractor.h +16 -0
- data/lib/templates/xctestable/objc/Interactor/VIPERInteractor.m +10 -0
- data/lib/templates/xctestable/objc/Interactor/VIPERInteractorSpec.m +31 -0
- data/lib/templates/xctestable/objc/Presenter/VIPERPresenter.h +18 -0
- data/lib/templates/xctestable/objc/Presenter/VIPERPresenter.m +11 -0
- data/lib/templates/xctestable/objc/Presenter/VIPERPresenterSpec.m +31 -0
- data/lib/templates/xctestable/objc/Protocols/VIPERProtocols.h +64 -0
- data/lib/templates/xctestable/objc/ViewController/VIPERViewController.h +13 -0
- data/lib/templates/xctestable/objc/ViewController/VIPERViewController.m +32 -0
- data/lib/templates/xctestable/objc/ViewController/VIPERViewControllerSpec.m +31 -0
- data/lib/templates/xctestable/objc/WireFrame/VIPERWireFrame.h +19 -0
- data/lib/templates/xctestable/objc/WireFrame/VIPERWireFrame.m +31 -0
- data/lib/templates/xctestable/swift/DataManager/API/VIPERAPIDataManager.swift +11 -0
- data/lib/templates/xctestable/swift/DataManager/Local/VIPERLocalDataManager.swift +11 -0
- data/lib/templates/xctestable/swift/Interactor/VIPERInteractor.swift +15 -0
- data/lib/templates/xctestable/swift/Interactor/VIPERInteractorTests.swift +29 -0
- data/lib/templates/xctestable/swift/Presenter/VIPERPresenter.swift +15 -0
- data/lib/templates/xctestable/swift/Presenter/VIPERPresenterTests.swift +29 -0
- data/lib/templates/xctestable/swift/Protocols/VIPERProtocols.swift +70 -0
- data/lib/templates/xctestable/swift/View/VIPERView.swift +12 -0
- data/lib/templates/xctestable/swift/View/VIPERViewTests.swift +29 -0
- data/lib/templates/xctestable/swift/WireFrame/VIPERWireFrame.swift +32 -0
- data/lib/templates/xctestable/viperspec.yml +4 -0
- data/lib/vipergen/dirutils.rb +17 -0
- data/lib/vipergen/filemanager.rb +51 -0
- data/lib/vipergen/generator.rb +66 -0
- data/lib/vipergen/templatemanager.rb +53 -0
- data/lib/vipergen/version.rb +4 -0
- data/lib/vipergen/viperthor.rb +21 -0
- data/lib/vipergen.rb +6 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/vipergen/vipergen_spec.rb +133 -0
- metadata +207 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
module Vipergen
|
2
|
+
# Cosntants
|
3
|
+
class Generator
|
4
|
+
# Constants
|
5
|
+
LANGUAGES = ["swift", "objc"]
|
6
|
+
REPLACEMENT_KEY = "VIPER"
|
7
|
+
AUTHOR_REPLACEMENT_KEY = "AUTHOR"
|
8
|
+
YEAR_REPLACEMENT_KEY = "YEAR"
|
9
|
+
SWIFT_MODULE_REPLACEMENT_KEY = "SWIFT_MODULE"
|
10
|
+
|
11
|
+
# Main method that generate the VIPER files structure
|
12
|
+
def self.generate_viper(template, language, name, path, author, swift_module)
|
13
|
+
puts "Generating VIPER-Module"
|
14
|
+
puts "Template: #{template}"
|
15
|
+
puts "Language: #{language}"
|
16
|
+
puts "Name: #{name}"
|
17
|
+
puts "Path: #{path}"
|
18
|
+
puts "Author: #{author}"
|
19
|
+
puts "Module: #{swift_module}"
|
20
|
+
path_from = Vipergen::FileManager.path_from(template, language)
|
21
|
+
path_to = Vipergen::FileManager.destination_viper_path(path, name)
|
22
|
+
Vipergen::FileManager.copy(path_from, path_to)
|
23
|
+
files = Vipergen::FileManager.files_in_path(path_to)
|
24
|
+
rename_files(files, name, author, swift_module)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Rename all the files in the files array
|
28
|
+
# - It renames the name of the file
|
29
|
+
# - It renames the content of the file
|
30
|
+
def self.rename_files(files, name, author, swift_module)
|
31
|
+
files.each do |file|
|
32
|
+
raise SyntaxError unless file.include? (Vipergen::Generator::REPLACEMENT_KEY)
|
33
|
+
rename_file(file, name, author, swift_module)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Rename a given file
|
38
|
+
# - It renames the name of the file
|
39
|
+
# - It renames the content of the file
|
40
|
+
def self.rename_file(file, name, author, swift_module)
|
41
|
+
new_path = file.gsub((Vipergen::Generator::REPLACEMENT_KEY), name)
|
42
|
+
Vipergen::FileManager.move(file, new_path)
|
43
|
+
rename_file_content(new_path, name, author, swift_module)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Rename the file content
|
47
|
+
# @return: An String with the every VIPER replaced by 'name'
|
48
|
+
def self.rename_file_content(filename, name, author, swift_module)
|
49
|
+
# Reading content
|
50
|
+
file = File.open(filename, "rb")
|
51
|
+
content = file.read
|
52
|
+
file.close
|
53
|
+
|
54
|
+
# Replacing content
|
55
|
+
content = content.gsub((Vipergen::Generator::REPLACEMENT_KEY), name)
|
56
|
+
content = content.gsub((Vipergen::Generator::AUTHOR_REPLACEMENT_KEY), author)
|
57
|
+
content = content.gsub((Vipergen::Generator::SWIFT_MODULE_REPLACEMENT_KEY), swift_module)
|
58
|
+
content = content.gsub((Vipergen::Generator::YEAR_REPLACEMENT_KEY), "#{Time.new.year}")
|
59
|
+
|
60
|
+
# Saving content with replaced string
|
61
|
+
File.open(filename, "w+") do |file|
|
62
|
+
file.write(content)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
module Vipergen
|
3
|
+
class TemplateManager
|
4
|
+
|
5
|
+
# Returns the templates dir
|
6
|
+
def self.templates_dir
|
7
|
+
t = "#{File.expand_path File.dirname(__FILE__)}/../templates"
|
8
|
+
end
|
9
|
+
|
10
|
+
# Get the available templates paths
|
11
|
+
# @return Array[String] with available templates paths
|
12
|
+
def self.templates_paths()
|
13
|
+
template_dir = Vipergen::TemplateManager.templates_dir
|
14
|
+
return Vipergen::DirUtils.directories_in(template_dir)
|
15
|
+
end
|
16
|
+
|
17
|
+
# Get the templates names
|
18
|
+
# @return Array[String] with templates names (got from the folder)
|
19
|
+
def self.templates()
|
20
|
+
templates_paths.map{|template_path| template_name_from_path(template_path)}
|
21
|
+
end
|
22
|
+
|
23
|
+
# Returns the template name from a given template_path
|
24
|
+
# @return String with the template name
|
25
|
+
def self.template_name_from_path(template_path)
|
26
|
+
return template_path.split("/").last
|
27
|
+
end
|
28
|
+
|
29
|
+
# Returns the description of all the templates available
|
30
|
+
# @return String with the entire description
|
31
|
+
def self.templates_description()
|
32
|
+
description = "\nAvailable templates \n"
|
33
|
+
description += "------------------- \n"
|
34
|
+
self.templates_paths.each do |template_path|
|
35
|
+
description += "> #{template_description(template_path)} \n"
|
36
|
+
end
|
37
|
+
return description
|
38
|
+
end
|
39
|
+
|
40
|
+
# Returns the description of a given template
|
41
|
+
# @param template String with the template path whose description is going to be returned
|
42
|
+
# @return String with the template description
|
43
|
+
def self.template_description(template_path)
|
44
|
+
template_description = ""
|
45
|
+
|
46
|
+
# Reading yaml
|
47
|
+
template_content = YAML.load_file(File.join(template_path,'viperspec.yml'))
|
48
|
+
|
49
|
+
# Generating string
|
50
|
+
template_description+= "| #{template_name_from_path(template_path)} by #{template_content["author"]} |: #{template_content["template_description"]}"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'vipergen'
|
3
|
+
|
4
|
+
module Vipergen
|
5
|
+
class ViperThor < Thor
|
6
|
+
desc "generate", "Generate a VIPER module"
|
7
|
+
option :language, :required => false, :default => 'objc', :type => :string, :desc => "The language of the generated module (swift, objc)"
|
8
|
+
option :template, :required => false, :default => 'default', :type => :string , :desc => "Template for the generation"
|
9
|
+
option :path, :required => true, :type => :string , :desc => "Path where the output module is going to be saved"
|
10
|
+
option :author, :required => false, :default => 'VIPER', :type => :string , :desc => "Author to be specified on the file's header. Otherwise VIPER will be used"
|
11
|
+
option :swift_module, :required => false, :default => 'VIPER', :type => :string , :desc => "Swift module name to be specified on the @testable directive. Otherwise VIPER will be used"
|
12
|
+
def generate(name)
|
13
|
+
Vipergen::Generator.generate_viper(options[:template], options[:language], name, options[:path], options[:author], options[:swift_module])
|
14
|
+
end
|
15
|
+
|
16
|
+
desc "templates", "Get a list of available templates"
|
17
|
+
def templates()
|
18
|
+
puts Vipergen::TemplateManager.templates_description()
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/vipergen.rb
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Vipergen do
|
4
|
+
context "when generating path" do
|
5
|
+
it "should return nil if no valid template" do
|
6
|
+
valid_template = Vipergen::FileManager.is_template_valid("asdgas")
|
7
|
+
expect(valid_template).to be(false)
|
8
|
+
end
|
9
|
+
it "should return nil if no valid language" do
|
10
|
+
valid_template = Vipergen::FileManager.is_template_valid("asdgas")
|
11
|
+
expect(valid_template).to be(false)
|
12
|
+
end
|
13
|
+
it "should return nil if no valid language when getting path" do
|
14
|
+
path = Vipergen::FileManager.path_from("default", "asgass")
|
15
|
+
expect(path).to be(nil)
|
16
|
+
end
|
17
|
+
it "should return nil if no valid template when getting path" do
|
18
|
+
path = Vipergen::FileManager.path_from("asga", "swift")
|
19
|
+
expect(path).to be(nil)
|
20
|
+
end
|
21
|
+
it "should append the name to the given user path" do
|
22
|
+
to_path = Vipergen::FileManager.destination_viper_path("path/", "pepito")
|
23
|
+
expect(to_path).to eq(File.join(File.expand_path("path/"),"pepito"))
|
24
|
+
end
|
25
|
+
end
|
26
|
+
context "copying a folder to a diferent place" do
|
27
|
+
before (:each) do
|
28
|
+
Dir.mkdir 'foo'
|
29
|
+
Dir.mkdir 'foo/subfoo'
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should copy a given folder properly" do
|
33
|
+
Vipergen::FileManager.copy('foo','test_foo')
|
34
|
+
expect(File.directory?('test_foo/subfoo')).to eq(true)
|
35
|
+
end
|
36
|
+
|
37
|
+
after (:each) do
|
38
|
+
FileUtils.rm_rf('foo')
|
39
|
+
FileUtils.rm_rf('test_foo')
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe Vipergen::Generator do
|
45
|
+
context "when renaming file content" do
|
46
|
+
before (:each) do
|
47
|
+
File.open("test.txt", 'w') {|f| f.write("I'm a #{Vipergen::Generator::REPLACEMENT_KEY} file by #{Vipergen::Generator::AUTHOR_REPLACEMENT_KEY} on #{Vipergen::Generator::YEAR_REPLACEMENT_KEY}") }
|
48
|
+
end
|
49
|
+
|
50
|
+
it "should rename every VIPER word to the given name" do
|
51
|
+
Vipergen::Generator.rename_file_content("test.txt","RENAMED", "pepito")
|
52
|
+
file = File.open("test.txt", "rb")
|
53
|
+
content = file.read
|
54
|
+
expect(content).to eq("I'm a RENAMED file by pepito on #{Time.new.year}")
|
55
|
+
end
|
56
|
+
|
57
|
+
after (:each) do
|
58
|
+
FileUtils.rm('test.txt')
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
context "when renaming file" do
|
63
|
+
before (:each) do
|
64
|
+
File.open("#{Vipergen::Generator::REPLACEMENT_KEY}test.txt", 'w') {|f| f.write("I'm a #{Vipergen::Generator::REPLACEMENT_KEY} file") }
|
65
|
+
end
|
66
|
+
|
67
|
+
it "every file should be renamed in rename_files" do
|
68
|
+
expect(Vipergen::Generator).to receive(:rename_file)
|
69
|
+
Vipergen::Generator.rename_files(["#{Vipergen::Generator::REPLACEMENT_KEY}file.txt"], "MyModule", "Pepi")
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should raise a SyntaxError exeption if there's a file in the template without the proper name" do
|
73
|
+
expect{Vipergen::Generator.rename_files(["asgasgs.txt"], "MyModule", "Pepi")}.to raise_error
|
74
|
+
end
|
75
|
+
|
76
|
+
it "should rename the VIPER in name to the given name" do
|
77
|
+
file = "#{Vipergen::Generator::REPLACEMENT_KEY}test.txt"
|
78
|
+
name = "RENAMED"
|
79
|
+
author = "PEPI"
|
80
|
+
Vipergen::Generator.rename_file(file, name, author)
|
81
|
+
expect(File.exist? "RENAMEDtest.txt").to eq(true)
|
82
|
+
end
|
83
|
+
|
84
|
+
it "should rename the file content after the file name rename" do
|
85
|
+
file = "#{Vipergen::Generator::REPLACEMENT_KEY}test.txt"
|
86
|
+
name = "RENAMED"
|
87
|
+
author = "PEPI"
|
88
|
+
expect(Vipergen::Generator).to receive(:rename_file_content)
|
89
|
+
Vipergen::Generator.rename_file(file, name, author)
|
90
|
+
end
|
91
|
+
|
92
|
+
after (:each) do
|
93
|
+
File.delete "#{Vipergen::Generator::REPLACEMENT_KEY}test.txt" if File.exist? "#{Vipergen::Generator::REPLACEMENT_KEY}test.txt"
|
94
|
+
File.delete "RENAMEDtest.txt" if File.exist? "RENAMEDtest.txt"
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
describe Vipergen::DirUtils do
|
100
|
+
context "getting directories" do
|
101
|
+
before (:each) do
|
102
|
+
Dir.mkdir 'foo'
|
103
|
+
Dir.mkdir 'foo/subfoo'
|
104
|
+
end
|
105
|
+
|
106
|
+
it "should return the directories inside a given one" do
|
107
|
+
expect(Vipergen::DirUtils.directories_in('foo').count).to eq(1)
|
108
|
+
end
|
109
|
+
|
110
|
+
after (:each) do
|
111
|
+
FileUtils.rm_rf('foo')
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
describe Vipergen::TemplateManager do
|
117
|
+
context "getting templates" do
|
118
|
+
before (:each) do
|
119
|
+
Dir.mkdir 'foo'
|
120
|
+
Dir.mkdir 'foo/subfoo'
|
121
|
+
Dir.mkdir 'foo/subfoo2'
|
122
|
+
end
|
123
|
+
|
124
|
+
it "should return the proper templates in templates directory" do
|
125
|
+
Vipergen::TemplateManager.stub(:templates_dir).and_return('foo/')
|
126
|
+
expect(Vipergen::TemplateManager.templates_paths.count).to eq(2)
|
127
|
+
end
|
128
|
+
|
129
|
+
after (:each) do
|
130
|
+
FileUtils.rm_rf('foo')
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
metadata
ADDED
@@ -0,0 +1,207 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vipergen-xctestable
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.9
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Pedro Piñera
|
8
|
+
- Michal Wojtysiak
|
9
|
+
- Hasan Huseyin Topcu
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2016-09-14 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rake
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - '>='
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: rspec
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
type: :development
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: bundler
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ~>
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.0'
|
50
|
+
type: :development
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ~>
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '1.0'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: byebug
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
type: :development
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: thor
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
type: :runtime
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - '>='
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
description: Based on the objc.io post about VIPER. It saves time in the implementation
|
86
|
+
generating the controllers and adding interactions between them (in Swift or Objective-C)
|
87
|
+
email: hhtopcu@gmail.com
|
88
|
+
executables:
|
89
|
+
- vipergen
|
90
|
+
extensions: []
|
91
|
+
extra_rdoc_files:
|
92
|
+
- README.md
|
93
|
+
files:
|
94
|
+
- LICENSE
|
95
|
+
- README.md
|
96
|
+
- lib/templates/default/objc/DataManager/API/VIPERAPIDataManager.h
|
97
|
+
- lib/templates/default/objc/DataManager/API/VIPERAPIDataManager.m
|
98
|
+
- lib/templates/default/objc/DataManager/Local/VIPERLocalDataManager.h
|
99
|
+
- lib/templates/default/objc/DataManager/Local/VIPERLocalDataManager.m
|
100
|
+
- lib/templates/default/objc/Interactor/VIPERInteractor.h
|
101
|
+
- lib/templates/default/objc/Interactor/VIPERInteractor.m
|
102
|
+
- lib/templates/default/objc/Interactor/VIPERItem.h
|
103
|
+
- lib/templates/default/objc/Interactor/VIPERItem.m
|
104
|
+
- lib/templates/default/objc/Presenter/VIPERPresenter.h
|
105
|
+
- lib/templates/default/objc/Presenter/VIPERPresenter.m
|
106
|
+
- lib/templates/default/objc/Protocols/VIPERProtocols.h
|
107
|
+
- lib/templates/default/objc/View/VIPERView.h
|
108
|
+
- lib/templates/default/objc/View/VIPERView.m
|
109
|
+
- lib/templates/default/objc/WireFrame/VIPERWireFrame.h
|
110
|
+
- lib/templates/default/objc/WireFrame/VIPERWireFrame.m
|
111
|
+
- lib/templates/default/swift/DataManager/API/VIPERAPIDataManager.swift
|
112
|
+
- lib/templates/default/swift/DataManager/Local/VIPERLocalDataManager.swift
|
113
|
+
- lib/templates/default/swift/Interactor/VIPERInteractor.swift
|
114
|
+
- lib/templates/default/swift/Interactor/VIPERItem.swift
|
115
|
+
- lib/templates/default/swift/Presenter/VIPERPresenter.swift
|
116
|
+
- lib/templates/default/swift/Protocols/VIPERProtocols.swift
|
117
|
+
- lib/templates/default/swift/View/VIPERView.swift
|
118
|
+
- lib/templates/default/swift/WireFrame/VIPERWireFrame.swift
|
119
|
+
- lib/templates/default/viperspec.yml
|
120
|
+
- lib/templates/testable/objc/DataManager/VIPERDataManager.h
|
121
|
+
- lib/templates/testable/objc/DataManager/VIPERDataManager.m
|
122
|
+
- lib/templates/testable/objc/Interactor/VIPERInteractor.h
|
123
|
+
- lib/templates/testable/objc/Interactor/VIPERInteractor.m
|
124
|
+
- lib/templates/testable/objc/Interactor/VIPERInteractorSpec.m
|
125
|
+
- lib/templates/testable/objc/Presenter/VIPERPresenter.h
|
126
|
+
- lib/templates/testable/objc/Presenter/VIPERPresenter.m
|
127
|
+
- lib/templates/testable/objc/Presenter/VIPERPresenterSpec.m
|
128
|
+
- lib/templates/testable/objc/Protocols/VIPERProtocols.h
|
129
|
+
- lib/templates/testable/objc/ViewController/VIPERViewController.h
|
130
|
+
- lib/templates/testable/objc/ViewController/VIPERViewController.m
|
131
|
+
- lib/templates/testable/objc/ViewController/VIPERViewControllerSpec.m
|
132
|
+
- lib/templates/testable/objc/WireFrame/VIPERWireFrame.h
|
133
|
+
- lib/templates/testable/objc/WireFrame/VIPERWireFrame.m
|
134
|
+
- lib/templates/testable/swift/DataManager/API/VIPERAPIDataManager.swift
|
135
|
+
- lib/templates/testable/swift/DataManager/Local/VIPERLocalDataManager.swift
|
136
|
+
- lib/templates/testable/swift/Interactor/VIPERInteractor.swift
|
137
|
+
- lib/templates/testable/swift/Interactor/VIPERInteractorSpec.swift
|
138
|
+
- lib/templates/testable/swift/Presenter/VIPERPresenter.swift
|
139
|
+
- lib/templates/testable/swift/Presenter/VIPERPresenterSpec.swift
|
140
|
+
- lib/templates/testable/swift/Protocols/VIPERProtocols.swift
|
141
|
+
- lib/templates/testable/swift/View/VIPERView.swift
|
142
|
+
- lib/templates/testable/swift/View/VIPERViewSpec.swift
|
143
|
+
- lib/templates/testable/swift/WireFrame/VIPERWireFrame.swift
|
144
|
+
- lib/templates/testable/viperspec.yml
|
145
|
+
- lib/templates/xctestable/objc/DataManager/VIPERDataManager.h
|
146
|
+
- lib/templates/xctestable/objc/DataManager/VIPERDataManager.m
|
147
|
+
- lib/templates/xctestable/objc/Interactor/VIPERInteractor.h
|
148
|
+
- lib/templates/xctestable/objc/Interactor/VIPERInteractor.m
|
149
|
+
- lib/templates/xctestable/objc/Interactor/VIPERInteractorSpec.m
|
150
|
+
- lib/templates/xctestable/objc/Presenter/VIPERPresenter.h
|
151
|
+
- lib/templates/xctestable/objc/Presenter/VIPERPresenter.m
|
152
|
+
- lib/templates/xctestable/objc/Presenter/VIPERPresenterSpec.m
|
153
|
+
- lib/templates/xctestable/objc/Protocols/VIPERProtocols.h
|
154
|
+
- lib/templates/xctestable/objc/ViewController/VIPERViewController.h
|
155
|
+
- lib/templates/xctestable/objc/ViewController/VIPERViewController.m
|
156
|
+
- lib/templates/xctestable/objc/ViewController/VIPERViewControllerSpec.m
|
157
|
+
- lib/templates/xctestable/objc/WireFrame/VIPERWireFrame.h
|
158
|
+
- lib/templates/xctestable/objc/WireFrame/VIPERWireFrame.m
|
159
|
+
- lib/templates/xctestable/swift/DataManager/API/VIPERAPIDataManager.swift
|
160
|
+
- lib/templates/xctestable/swift/DataManager/Local/VIPERLocalDataManager.swift
|
161
|
+
- lib/templates/xctestable/swift/Interactor/VIPERInteractor.swift
|
162
|
+
- lib/templates/xctestable/swift/Interactor/VIPERInteractorTests.swift
|
163
|
+
- lib/templates/xctestable/swift/Presenter/VIPERPresenter.swift
|
164
|
+
- lib/templates/xctestable/swift/Presenter/VIPERPresenterTests.swift
|
165
|
+
- lib/templates/xctestable/swift/Protocols/VIPERProtocols.swift
|
166
|
+
- lib/templates/xctestable/swift/View/VIPERView.swift
|
167
|
+
- lib/templates/xctestable/swift/View/VIPERViewTests.swift
|
168
|
+
- lib/templates/xctestable/swift/WireFrame/VIPERWireFrame.swift
|
169
|
+
- lib/templates/xctestable/viperspec.yml
|
170
|
+
- lib/vipergen/dirutils.rb
|
171
|
+
- lib/vipergen/filemanager.rb
|
172
|
+
- lib/vipergen/generator.rb
|
173
|
+
- lib/vipergen/templatemanager.rb
|
174
|
+
- lib/vipergen/version.rb
|
175
|
+
- lib/vipergen/viperthor.rb
|
176
|
+
- lib/vipergen.rb
|
177
|
+
- spec/spec_helper.rb
|
178
|
+
- spec/vipergen/vipergen_spec.rb
|
179
|
+
- bin/vipergen
|
180
|
+
homepage: https://github.com/hhtopcu/viper-module-generator
|
181
|
+
licenses:
|
182
|
+
- MIT
|
183
|
+
metadata: {}
|
184
|
+
post_install_message:
|
185
|
+
rdoc_options:
|
186
|
+
- --charset=UTF-8
|
187
|
+
require_paths:
|
188
|
+
- lib
|
189
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - '>='
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '0'
|
194
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
|
+
requirements:
|
196
|
+
- - '>='
|
197
|
+
- !ruby/object:Gem::Version
|
198
|
+
version: '0'
|
199
|
+
requirements: []
|
200
|
+
rubyforge_project:
|
201
|
+
rubygems_version: 2.0.14.1
|
202
|
+
signing_key:
|
203
|
+
specification_version: 4
|
204
|
+
summary: Generates XCode VIPER module controllers structure
|
205
|
+
test_files:
|
206
|
+
- spec/spec_helper.rb
|
207
|
+
- spec/vipergen/vipergen_spec.rb
|