rspec-model 0.1.1 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c3a6231e6b38e5e1cd5cefaf4c6ea04abb1fd300de366bfca26f3d80b3adbac
4
- data.tar.gz: e6269fb4d4e33f1cf2dcb9d4e01758c2cf5ec00ab18d7b236030fc6c0e30519d
3
+ metadata.gz: 1b5dfd97e8015044969ad11c26300b7ce7058bdfba68d6cf85c1f457f2d13c4d
4
+ data.tar.gz: efe8adc439567b907aab7a7b85f9e8e3400677e099bfea4ab4cc76ebfd22113a
5
5
  SHA512:
6
- metadata.gz: 9c137de19721b4a3608c78ee558bba0f212402adb2697ad2c0c812323bd83b631252e59d1fff62b3052a2ac8596c0d47466665f8f11fc5c24c820b476f7664f5
7
- data.tar.gz: b136321e9b6495b880231203adad998c52d6c984d4a92e9f8486375ba86759a350fb1b84b5f24ba6dd25c3b5b5741f03625d87a91c5a9526bdf06e3c7b0fa7ba
6
+ metadata.gz: 783bdbedced40f3466220717173e8663e3349a89df23048ab531868f92bb6b5c90c37e8e660424eb5bfd4351f5f0e313941d3001f1e93996f46f046a7d2d01af
7
+ data.tar.gz: e2c6d66dd33fc8b7ee5652c96004905f1d32aed47d8fae6fdec8494393f1b81c9b5e3dfb8b5cc5f796153383068fdf020b8899e230c67b73c0c911dca4a9527b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.2 (2022-04-07)
4
+
5
+ - Remove .idea directory from the gem (#1)
6
+ - Use `Array.wrap` in the `specify_factory` and `specify_associations` (#2)
7
+
3
8
  ## 0.1.1 (2022-04-05)
4
9
 
5
10
  - Use `Array.wrap` in the `specify_user_permissions`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-model (0.1.1)
4
+ rspec-model (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rspec::Model
1
+ # RSpec::Model
2
2
 
3
3
  Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rspec/model`. To experiment with that code, run `bin/console` for an interactive prompt.
4
4
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module Model
5
- VERSION = "0.1.1"
5
+ VERSION = "0.1.2"
6
6
  end
7
7
  end
data/lib/rspec/specs.rb CHANGED
@@ -23,7 +23,7 @@ module RSpec
23
23
  end
24
24
  end
25
25
 
26
- def specify_factory(factory_name: nil, traits: nil, context_name: nil) # :nodoc:
26
+ def specify_factory(factory_name: nil, traits: nil, context_name: nil) # :nodoc:
27
27
  factory_name = described_class.name.underscore.gsub('/', '_').to_sym unless factory_name
28
28
 
29
29
  describe context_name || 'factory' do
@@ -31,7 +31,7 @@ module RSpec
31
31
 
32
32
  it { is_expected.to be_valid }
33
33
 
34
- traits&.each do |trait|
34
+ Array.wrap(traits).each do |trait|
35
35
  context "with #{trait} trait" do
36
36
  subject { build_stubbed factory_name, trait }
37
37
 
@@ -43,11 +43,11 @@ module RSpec
43
43
 
44
44
  def specify_associations(belongs_to: nil, has_many: nil, context_name: nil) # :nodoc:
45
45
  describe context_name || 'associations' do
46
- belongs_to&.each do |association|
46
+ Array.wrap(belongs_to).each do |association|
47
47
  it { is_expected.to belong_to association }
48
48
  end
49
49
 
50
- has_many&.each do |association, dependent|
50
+ Array.wrap(has_many).each do |association, dependent|
51
51
  it { is_expected.to have_many(association).dependent(dependent) }
52
52
  end
53
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - roman.strazanec
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-05 00:00:00.000000000 Z
11
+ date: 2022-04-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Write common specifications for the models in your Ruby on Rails application.
14
14
  email:
@@ -17,11 +17,6 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
- - ".idea/.gitignore"
21
- - ".idea/misc.xml"
22
- - ".idea/modules.xml"
23
- - ".idea/rspec-model.iml"
24
- - ".idea/vcs.xml"
25
20
  - ".rspec"
26
21
  - ".standard.yml"
27
22
  - CHANGELOG.md
data/.idea/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- # Default ignored files
2
- /shelf/
3
- /workspace.xml
4
- # Editor-based HTTP Client requests
5
- /httpRequests/
6
- # Datasource local storage ignored files
7
- /dataSources/
8
- /dataSources.local.xml
9
- # CodeStream ignored files
10
- /codestream.xml
data/.idea/misc.xml DELETED
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-3.1.1" project-jdk-type="RUBY_SDK" />
4
- </project>
data/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/rspec-model.iml" filepath="$PROJECT_DIR$/.idea/rspec-model.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,74 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="RUBY_MODULE" version="4">
3
- <component name="ModuleRunConfigurationManager">
4
- <shared />
5
- </component>
6
- <component name="NewModuleRootManager">
7
- <content url="file://$MODULE_DIR$">
8
- <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
- <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
- <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
- </content>
12
- <orderEntry type="inheritedJdk" />
13
- <orderEntry type="sourceFolder" forTests="false" />
14
- <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, RVM: ruby-3.1.1) [gem]" level="application" />
15
- <orderEntry type="library" scope="PROVIDED" name="bundler (v2.3.7, RVM: ruby-3.1.1) [gem]" level="application" />
16
- <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, RVM: ruby-3.1.1) [gem]" level="application" />
17
- <orderEntry type="library" scope="PROVIDED" name="parallel (v1.22.1, RVM: ruby-3.1.1) [gem]" level="application" />
18
- <orderEntry type="library" scope="PROVIDED" name="parser (v3.1.1.0, RVM: ruby-3.1.1) [gem]" level="application" />
19
- <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, RVM: ruby-3.1.1) [gem]" level="application" />
20
- <orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, RVM: ruby-3.1.1) [gem]" level="application" />
21
- <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.2.1, RVM: ruby-3.1.1) [gem]" level="application" />
22
- <orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, RVM: ruby-3.1.1) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="rspec (v3.11.0, RVM: ruby-3.1.1) [gem]" level="application" />
24
- <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.11.0, RVM: ruby-3.1.1) [gem]" level="application" />
25
- <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.11.0, RVM: ruby-3.1.1) [gem]" level="application" />
26
- <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.11.1, RVM: ruby-3.1.1) [gem]" level="application" />
27
- <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.11.0, RVM: ruby-3.1.1) [gem]" level="application" />
28
- <orderEntry type="library" scope="PROVIDED" name="rubocop (v1.26.1, RVM: ruby-3.1.1) [gem]" level="application" />
29
- <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.16.0, RVM: ruby-3.1.1) [gem]" level="application" />
30
- <orderEntry type="library" scope="PROVIDED" name="rubocop-performance (v1.13.3, RVM: ruby-3.1.1) [gem]" level="application" />
31
- <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, RVM: ruby-3.1.1) [gem]" level="application" />
32
- <orderEntry type="library" scope="PROVIDED" name="standard (v1.9.1, RVM: ruby-3.1.1) [gem]" level="application" />
33
- <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.1.0, RVM: ruby-3.1.1) [gem]" level="application" />
34
- </component>
35
- <component name="RakeTasksCache">
36
- <option name="myRootTask">
37
- <RakeTaskImpl id="rake">
38
- <subtasks>
39
- <RakeTaskImpl description="Build rspec-model-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
40
- <RakeTaskImpl id="build">
41
- <subtasks>
42
- <RakeTaskImpl description="Generate SHA512 checksum if rspec-model-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
43
- </subtasks>
44
- </RakeTaskImpl>
45
- <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
46
- <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
47
- <RakeTaskImpl description="Build and install rspec-model-0.1.0.gem into system gems" fullCommand="install" id="install" />
48
- <RakeTaskImpl id="install">
49
- <subtasks>
50
- <RakeTaskImpl description="Build and install rspec-model-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
51
- </subtasks>
52
- </RakeTaskImpl>
53
- <RakeTaskImpl description="Create tag v0.1.0 and build and push rspec-model-0.1.0.gem to TODO: Set to your gem server 'https://example.com'" fullCommand="release[remote]" id="release[remote]" />
54
- <RakeTaskImpl description="Run RSpec code examples" fullCommand="spec" id="spec" />
55
- <RakeTaskImpl description="Lint with the Standard Ruby style guide" fullCommand="standard" id="standard" />
56
- <RakeTaskImpl id="standard">
57
- <subtasks>
58
- <RakeTaskImpl description="Lint and automatically fix with the Standard Ruby style guide" fullCommand="standard:fix" id="fix" />
59
- </subtasks>
60
- </RakeTaskImpl>
61
- <RakeTaskImpl description="" fullCommand="default" id="default" />
62
- <RakeTaskImpl description="" fullCommand="release" id="release" />
63
- <RakeTaskImpl id="release">
64
- <subtasks>
65
- <RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
66
- <RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
67
- <RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
68
- </subtasks>
69
- </RakeTaskImpl>
70
- </subtasks>
71
- </RakeTaskImpl>
72
- </option>
73
- </component>
74
- </module>
data/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>