mayday 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/bin/mayday +12 -4
- data/lib/mayday/target_integrator.rb +5 -0
- data/lib/mayday/user_definitions.rb +6 -0
- data/lib/mayday/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 651a5d736ee2bb4808a0614cd271c0c105cce354
|
4
|
+
data.tar.gz: 136b95b8b07bc2998e71d11946e0f8229736b91a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 178276fbf600d9ff41327bb1181aa19a55198f78f4fb05243dde869661b3c7cc13b338b2465115a342ab2bf6413e34018ef648b43fd9e58dbf9a90b530a5df45
|
7
|
+
data.tar.gz: 303d8cf322eece9872b38d97750c26275f1d026ad5a15c319f65add3ed537ea7170643f28ec1cad02d8f77526d3a4fb611ee9cf0c11dbc67ef4e4aba11de712a
|
data/README.md
CHANGED
@@ -65,6 +65,18 @@ Next time you build your project, your errors and warnings will be flagged
|
|
65
65
|
|
66
66
|
![Mayday warnings and errors in Xcode, inline](https://raw.githubusercontent.com/marklarr/mayday/master/docs/example_inline.jpg?token=760261__eyJzY29wZSI6IlJhd0Jsb2I6bWFya2xhcnIvbWF5ZGF5L21hc3Rlci9kb2NzL2V4YW1wbGVfaW5saW5lLmpwZyIsImV4cGlyZXMiOjE0MTQzOTAzMzh9--bc9abbe40843317e7b6a30a9521ebf6ae457ece2)
|
67
67
|
|
68
|
+
You can also run mayday from the command line
|
69
|
+
|
70
|
+
```sh
|
71
|
+
$ mayday run
|
72
|
+
```
|
73
|
+
|
74
|
+
You also have the option to choose the file specifying the project and rules (by default this will be `Maydayfile`) using
|
75
|
+
|
76
|
+
```sh
|
77
|
+
$ mayday run --rules MyRulesFile
|
78
|
+
```
|
79
|
+
|
68
80
|
Since Ruby is installed by default on OSX, the warnings and errors will work for anybody building your project, even if they don't have RVM, RubyGems, or mayday.
|
69
81
|
|
70
82
|
### Options
|
data/bin/mayday
CHANGED
@@ -9,11 +9,13 @@ Clamp do
|
|
9
9
|
self.default_subcommand = "up"
|
10
10
|
|
11
11
|
MAYDAY_FILE_PATH = "Maydayfile"
|
12
|
+
|
13
|
+
option "--rules", "RULES_FILE", "The file containing Mayday rules", :default => MAYDAY_FILE_PATH, :attribute_name => :mayday_file_path
|
12
14
|
|
13
15
|
subcommand "init", "Creates a new Maydayfile" do
|
14
16
|
def execute
|
15
17
|
puts "Creating a new Maydayfile..."
|
16
|
-
Mayday::UserDefinitions.new(
|
18
|
+
Mayday::UserDefinitions.new(mayday_file_path).init
|
17
19
|
puts "Done!".green
|
18
20
|
end
|
19
21
|
end
|
@@ -21,7 +23,7 @@ Clamp do
|
|
21
23
|
subcommand "up", "Integrate the warnings and errors from Maydayfile into your Xcode project" do
|
22
24
|
def execute
|
23
25
|
puts "Integrating mayday into your project..."
|
24
|
-
Mayday::UserDefinitions.new(
|
26
|
+
Mayday::UserDefinitions.new(mayday_file_path).up
|
25
27
|
puts "Done!".green
|
26
28
|
end
|
27
29
|
end
|
@@ -29,14 +31,20 @@ Clamp do
|
|
29
31
|
subcommand "down", "Remove the warnings and errors from Maydayfile into your Xcode project" do
|
30
32
|
def execute
|
31
33
|
puts "Removing mayday from your project..."
|
32
|
-
Mayday::UserDefinitions.new(
|
34
|
+
Mayday::UserDefinitions.new(mayday_file_path).down
|
33
35
|
puts "Done!".green
|
34
36
|
end
|
35
37
|
end
|
36
38
|
|
37
39
|
subcommand "benchmark", "Output benchmark results of running your Maydayfile errors and warnings on your Xcode project" do
|
38
40
|
def execute
|
39
|
-
Mayday::UserDefinitions.new(
|
41
|
+
Mayday::UserDefinitions.new(mayday_file_path).benchmark
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
subcommand "run", "Run mayday from the command line" do
|
46
|
+
def execute
|
47
|
+
Mayday::UserDefinitions.new(mayday_file_path).run
|
40
48
|
end
|
41
49
|
end
|
42
50
|
end
|
@@ -42,6 +42,11 @@ module Mayday
|
|
42
42
|
benchmarker.report('Mayday') { eval(@script_generator.to_ruby(:exit_after => false, :output => false)) }
|
43
43
|
end
|
44
44
|
end
|
45
|
+
|
46
|
+
def run
|
47
|
+
ENV["SRCROOT"] = @project.path.parent.to_s
|
48
|
+
eval(@script_generator.to_ruby(:exit_after => false, :output => true))
|
49
|
+
end
|
45
50
|
|
46
51
|
def native_targets_to_integrate
|
47
52
|
native_targets = @project.targets.select do |target|
|
@@ -41,6 +41,12 @@ warning_regex 'TODO:', /\\s+\\/\\/\\s?TODO:/
|
|
41
41
|
Reader.new(file).to_target_integrator.benchmark
|
42
42
|
end
|
43
43
|
end
|
44
|
+
|
45
|
+
def run
|
46
|
+
mayday_file do |file|
|
47
|
+
Reader.new(file).to_target_integrator.run
|
48
|
+
end
|
49
|
+
end
|
44
50
|
|
45
51
|
def mayday_file
|
46
52
|
unless File.exist?(@mayday_file_path)
|
data/lib/mayday/version.rb
CHANGED