motion-redgreen 0.0.1 → 0.0.2

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.
data/README.md CHANGED
@@ -1,3 +1,13 @@
1
1
  # Motion::Redgreen
2
2
 
3
3
  Based on the https://github.com/mdks/rm-redgreen.
4
+
5
+ ## Configuration
6
+
7
+ You can specify the output style as follows:
8
+
9
+ ```ruby
10
+ app.redgreen_style = :full
11
+ ```
12
+
13
+ The available styles are *:focused* and *:full*.
@@ -2,6 +2,7 @@ require "motion-redgreen/version"
2
2
  require "motion-redgreen/config"
3
3
 
4
4
  Motion::Project::App.setup do |app|
5
+ app.redgreen_style = :focused
5
6
  app.development do
6
7
  app.files << File.expand_path(File.dirname(__FILE__) + '/motion-redgreen/ansiterm.rb')
7
8
  app.files << File.expand_path(File.dirname(__FILE__) + '/motion-redgreen/string.rb')
@@ -2,7 +2,23 @@ module Motion; module Project
2
2
  class Config
3
3
  alias :original_spec_files :spec_files
4
4
  def spec_files
5
- [File.expand_path(File.dirname(__FILE__) + '/spec_setup.rb')] + original_spec_files
5
+ [
6
+ File.expand_path(redgreen_style_config),
7
+ File.expand_path(File.dirname(__FILE__) + '/spec_setup.rb')
8
+ ] + original_spec_files
9
+ end
10
+
11
+ attr_accessor :redgreen_style
12
+
13
+ def redgreen_style_config
14
+ config_file = File.join(build_dir, 'redgreen_style_config.rb')
15
+ @redgreen_style ||= :focused
16
+
17
+ f = open(config_file, 'wb')
18
+ f.write("$RedGreenStyleFormat = :#{@redgreen_style}\n")
19
+ f.close
20
+
21
+ config_file
6
22
  end
7
23
  end
8
24
  end ; end
@@ -1,7 +1,4 @@
1
- # Supported styles:
2
- # :focused, :full, :original
3
- # --------------
4
- style = :focused
1
+ style = $RedGreenStyleFormat
5
2
  # --------------
6
3
  if Term.nil? || (style == :original)
7
4
  if Term.nil?
@@ -1,5 +1,5 @@
1
1
  module Motion
2
2
  module Redgreen
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-redgreen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-21 00:00:00.000000000 Z
12
+ date: 2012-05-22 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: RedGreen support for RubyMotion
15
15
  email: