mongify-mongoid 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d258f7b7209471b3b095f479cfd6c5ed609a5008
|
4
|
+
data.tar.gz: 3bdf8722185925908dd4925d431495038fbfcc42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19fc47f468b15c691102f70b5a55aba7b961f0e077dbec524fd9d7f11f2961d32498cac071aaebd58cbc947c0895a32569e0466f0c01be5d874f1fd4466fa5cb
|
7
|
+
data.tar.gz: 8c44b384ed37574af5a5b6a1e7237d77d193f008740e1b9e8d3824c13e469bae3d5a084b99f2d6e79a91f35a30daac4f8ca40e98ea918daa9e3b93cb344791ad
|
data/CHANGELOG.md
CHANGED
@@ -8,18 +8,18 @@ module Mongify
|
|
8
8
|
# command line.
|
9
9
|
#
|
10
10
|
class Application
|
11
|
-
|
11
|
+
|
12
12
|
# Successful execution exit code
|
13
13
|
STATUS_SUCCESS = 0
|
14
|
-
# Failed execution exit code
|
14
|
+
# Failed execution exit code
|
15
15
|
STATUS_ERROR = 1
|
16
|
-
|
16
|
+
|
17
17
|
def initialize(arguments=[], stdin=$stdin, stdout=$stdout)
|
18
18
|
arguments = ['-h'] if arguments.empty?
|
19
19
|
@options = Options.new(arguments)
|
20
20
|
@status = STATUS_SUCCESS
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
# Runs the application
|
24
24
|
def execute!
|
25
25
|
begin
|
@@ -39,17 +39,17 @@ module Mongify
|
|
39
39
|
raise error
|
40
40
|
end
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
# Sends output to the UI
|
44
44
|
def output(message)
|
45
45
|
UI.puts(message)
|
46
46
|
end
|
47
|
-
|
47
|
+
|
48
48
|
# Sets status code as successful
|
49
49
|
def report_success
|
50
50
|
@status = STATUS_SUCCESS
|
51
51
|
end
|
52
|
-
|
52
|
+
|
53
53
|
# Sets status code as failure (or error)
|
54
54
|
def report_error
|
55
55
|
@status = STATUS_ERROR
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'fileutils'
|
2
1
|
module Mongify
|
3
2
|
module Mongoid
|
4
3
|
module CLI
|
@@ -27,8 +26,8 @@ module Mongify
|
|
27
26
|
FileUtils.mkdir_p(output_folder)
|
28
27
|
end
|
29
28
|
|
30
|
-
generator = Mongify::Mongoid::Generator.new(@translation_file, output_folder)
|
31
|
-
generator.process
|
29
|
+
@generator = Mongify::Mongoid::Generator.new(@translation_file, output_folder)
|
30
|
+
@generator.process
|
32
31
|
|
33
32
|
output_success_message
|
34
33
|
|
@@ -56,7 +55,7 @@ module Mongify
|
|
56
55
|
end
|
57
56
|
|
58
57
|
def output_success_message
|
59
|
-
view.output("\nSuccessfully processed #{generator.models.count} models")
|
58
|
+
view.output("\nSuccessfully processed #{@generator.models.count} models")
|
60
59
|
view.output("You can find your files in #{output_folder}")
|
61
60
|
view.output("\nThank you for using Mongify and Mongify-Mongoid!")
|
62
61
|
view.output("If you have any issues, please feel free to report them at:\nhttps://github.com/anlek/mongify-mongoid/issues")
|
data/lib/mongify/mongoid/cli.rb
CHANGED
data/lib/mongify/mongoid.rb
CHANGED