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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 54fd6eae0019921ad08a561b8608c07cc05434be
4
- data.tar.gz: 8458b2fac4814310e1adf39f4c577218c5410a3b
3
+ metadata.gz: 651a5d736ee2bb4808a0614cd271c0c105cce354
4
+ data.tar.gz: 136b95b8b07bc2998e71d11946e0f8229736b91a
5
5
  SHA512:
6
- metadata.gz: 16bae0fba41a1e56aba29ab7daed21d295cb9006c970adcadf5ebb8b87e6f3b34997c65666812af5b4647db3adfbf4315d939186e44a19876d8342b2a53be4da
7
- data.tar.gz: ee96131376be5dabc33ec5dce2c823c2266616263e495b48dc2b5248868b880b4d0928be4579cc786eb4575c155a6f2398fe0d94e214d94d2ddcde3a52b4bcff
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(MAYDAY_FILE_PATH).init
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(MAYDAY_FILE_PATH).up
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(MAYDAY_FILE_PATH).down
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(MAYDAY_FILE_PATH).benchmark
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)
@@ -1,3 +1,3 @@
1
1
  module Mayday
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mayday
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Larsen