ar_to_ar 0.2.0 → 0.3.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: 90da784e19bf90a99f1f34b2ee124fa0921a5116
4
- data.tar.gz: 5db971bdc0f5ac270b98dfaf4942e9eb8f6b9152
3
+ metadata.gz: 052760c14f858420831f291ce9886834d02309bf
4
+ data.tar.gz: 028db699241aa280ba9422e6154926136a19f849
5
5
  SHA512:
6
- metadata.gz: bccf90dff8c178558f938941ba0dae8ca88a4c4dbfa315de0ea8335038e70920eb60a2fc0d01a6e203c5a740475bd25ee6b29fbd003c335b09f02c8a7121d62e
7
- data.tar.gz: b5bfb87d16b4662f06da57f069c9026f4fc43ef5ec38e4cb9aef30382934b8699210fb8a25a970cb5a44c6e2f90fc5faea9502c606834d8db5a4101174b8f73d
6
+ metadata.gz: b4bf0d7958f36c42467735c875a4b8de030aa2dccf7ec982db283973e71e4e9d70d2d60734eb762c6cd8190c0128ac5a769b795436017d3d9afd80e36637e370
7
+ data.tar.gz: 05f49ed7ed7caa5c5c07c6280b97bd74553d55de849c288318a04f7531b33f7fc22b3483bf5a03c1eed39b239fa2ea426cb2de8bd0f9bdc9274845c7f276984c
@@ -1,4 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.0.0
4
+ - 2.1.0
5
+ - 2.2.0
6
+ - 2.3.0
7
+
4
8
  before_install: gem install bundler -v 1.10.6
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015 Rishi
3
+ Copyright (c) Rishi Jain
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,7 +1,17 @@
1
+ [![Build Status](https://travis-ci.org/rishijain/ar_to_ar.svg?branch=master)](https://travis-ci.org/rishijain/ar_to_ar)
2
+ [![Gem Version](https://badge.fury.io/rb/ar_to_ar.svg)](https://badge.fury.io/rb/ar_to_ar)
3
+
1
4
  # ArToAr
2
5
 
3
6
  One of the notable changes in Rails 5 is that models now inherit from ApplicationRecord instead of ActiveRecord::Base. So this gem helps you avoid the manual labour of changing each and every model in your rails project. Instead just use the command line tool available through this gem.
4
7
 
8
+ It also adds an application_record.rb file with content:
9
+ ```ruby
10
+ class ApplicationRecord < ActiveRecord::Base
11
+ self.abstract_class = true
12
+ end
13
+ ```
14
+
5
15
  ## Installation
6
16
 
7
17
  Add this line to your application's Gemfile:
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.10"
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
- spec.add_development_dependency "minitest", '~> 0'
23
+ spec.add_development_dependency "minitest", '~> 5.8'
24
24
 
25
25
  spec.license = 'MIT'
26
26
  end
@@ -29,7 +29,7 @@ module ArToAr
29
29
  #class ModelName < ActiveRecord::Base
30
30
  def find_matched_line(file_path)
31
31
  File.open(file_path, "r++") do |file|
32
- return file.find { |line| line.match /(class(.+)<\s*ActiveRecord::Base)/ }
32
+ return file.find { |line| line.force_encoding('UTF-8').match /(class(.+)<\s*ActiveRecord::Base)/ }
33
33
  end
34
34
  end
35
35
 
@@ -1,3 +1,3 @@
1
1
  module ArToAr
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ar_to_ar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rishi Jain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-01 00:00:00.000000000 Z
11
+ date: 2016-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '5.8'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '5.8'
55
55
  description: When migrating to Rails 5, all models needs to be changed and application_record.rb
56
56
  needs to be added
57
57
  email: