spec_producer 0.4.0 → 0.5.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: aa9471f617a4a561c9341e4499b805ac78dde481
4
- data.tar.gz: 77191d8a8f92a2e5157839a18c19150e1c63c9dd
3
+ metadata.gz: 9d0a6951a87afcd5cddb9a36b20c6a1174af38c6
4
+ data.tar.gz: 5b714d4b2acedaf902aabc82d240057fc751f05f
5
5
  SHA512:
6
- metadata.gz: 38cf7383d2bb5b2fed451719d5a474d97c639d8f7ba24a7f999d7c77ae6441a875741cc4c976230c6391ef16c83650c0d8fa60ba06b67f38d8af139963a78e83
7
- data.tar.gz: ddcf094c9e1101b5b56083c682cd5d986d92eeb6d129cebc70c190f1a30f2a044a17f42e25b62f6a8d1837aab7a64286ee6f40a439cf7b086ed0b6d3520ce29e
6
+ metadata.gz: d55184e57a8c084392ec28da53a09f644b43a1a902a3eec92fa6b7fbbd0153fdb805d49bab089f48a57cf94abd24c58b95550fa46f51da280194943572a69d94
7
+ data.tar.gz: 2eee575741de47e967b687086fc26138e1ed9b1531ceb405f9a382c67dc2ccda3cfd6e5554e4147b2b040021c274a203bf78acf62a38ee9d7c70386cff96a2df
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.5.0 (2016-08-02)
2
+
3
+ Features:
4
+ * Updated routing specs producer to use expect rather than should
5
+ * Mini fix for projects that may not have ActiveRecord set
6
+
1
7
  ## 0.4.0 (2016-07-09)
2
8
 
3
9
  Features:
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # SpecProducer
2
2
 
3
+ [![Build Status](https://travis-ci.org/arcanoid/spec_producer.svg?branch=master)](https://travis-ci.org/arcanoid/spec_producer)
4
+ [![Gem Version](https://badge.fury.io/rb/spec_producer.svg)](https://badge.fury.io/rb/spec_producer)
5
+
3
6
  SpecProducer is a gem that is meant to assist users in skipping the tedious work of creating spec tests for basic
4
7
  functionality. It reads through the files of the project and prepares some of the basic spec tests for you.
5
8
 
data/lib/spec_producer.rb CHANGED
@@ -111,6 +111,8 @@ module SpecProducer
111
111
  end
112
112
 
113
113
  nil
114
+ rescue NameError
115
+ puts "ActiveRecord is not set for this project. Skipping model specs production."
114
116
  end
115
117
 
116
118
  def self.produce_specs_for_routes
@@ -132,8 +134,8 @@ module SpecProducer
132
134
  route_group[1].each do |route|
133
135
  final_text << " it \"#{route[:verb].upcase} #{route[:path]} should route to '#{route[:controller]}##{route[:action]}'\" do\n"
134
136
 
135
- final_text << " { :#{route[:verb]} => '#{route[:path].gsub(/:[a-zA-Z_]+/){ |param| param.gsub(':','').upcase }}'}.\n"
136
- final_text << " should route_to(:controller => '#{route[:controller]}',\n"
137
+ final_text << " expect(:#{route[:verb]} => '#{route[:path].gsub(/:[a-zA-Z_]+/){ |param| param.gsub(':','').upcase }}').\n"
138
+ final_text << " to route_to(:controller => '#{route[:controller]}',\n"
137
139
 
138
140
  /:[a-zA-Z_]+/.match(route[:path]).to_a.each do |parameter|
139
141
  final_text << " #{parameter} => '#{parameter.gsub(':','').upcase}',\n"
@@ -1,3 +1,3 @@
1
1
  module SpecProducer
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spec_producer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasilis Kalligas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-09 00:00:00.000000000 Z
11
+ date: 2016-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler