ar2gostruct 0.0.4 → 0.0.5

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
  SHA1:
3
- metadata.gz: 4b742d25812b2ad4e22a616197efc50194c9b097
4
- data.tar.gz: a7f34eb4e77c6d00a92217264343abe32634df9d
3
+ metadata.gz: 2bd7df59cfe124d352522d89953e3864bf627e51
4
+ data.tar.gz: ad23583822e54f5a17a989020167fe413d8efc5c
5
5
  SHA512:
6
- metadata.gz: c33e26fc4f80051847b3264408e775f2bbb1b3d79fcf1a7a0b87488f7b1f6b159971fce9dc73d237cc4bdb4ccd25540f249349c0a9a8a565cd6e8fa65439e72e
7
- data.tar.gz: dcf5278be58baa817690448dfe11f23b42a309de0929c35b478c778f601993686e021d1c9edd4afce37c0b4958a1ee1e9f31d7831fd5edccd98d5843cdb17acf
6
+ metadata.gz: 4287b8497964ae331587a301f9c5476e98869cecc514f8a43c93ee553c0b07587f7b9fe4dc293191657b22236829d04f6f329268460973a7a590fd4817a017e4
7
+ data.tar.gz: 1f5f6256d5c592e707b5d984636181157a16a6e75765e2be7d6b312d21ed1cd2e7eb920a9bc565ff305854b4f71b992635e90a9ca73085b7da484d9d5634a99f
data/README.md CHANGED
@@ -32,19 +32,19 @@ this will returns
32
32
  // app/models/users.rb
33
33
  // Table name: users
34
34
  type Users struct {
35
- Id int32 'json:"id"'
36
- Email string 'json:"email"'
37
- EncryptedPassword string 'json:"encrypted_password"'
38
- ResetPasswordToken string 'json:"reset_password_token"'
39
- ResetPasswordSentAt time.Time 'json:"reset_password_sent_at"'
40
- RememberCreatedAt time.Time 'json:"remember_created_at"'
41
- SignInCount int32 'json:"sign_in_count"'
42
- CurrentSignInAt time.Time 'json:"current_sign_in_at"'
43
- LastSignInAt time.Time 'json:"last_sign_in_at"'
44
- CurrentSignInIp string 'json:"current_sign_in_ip"'
45
- LastSignInIp string 'json:"last_sign_in_ip"'
46
- CreatedAt time.Time 'json:"created_at"'
47
- UpdatedAt time.Time 'json:"updated_at"'
35
+ Id int32 `json:"id"`
36
+ Email string `json:"email"`
37
+ EncryptedPassword string `json:"encrypted_password"`
38
+ ResetPasswordToken string `json:"reset_password_token"`
39
+ ResetPasswordSentAt time.Time `json:"reset_password_sent_at"`
40
+ RememberCreatedAt time.Time `json:"remember_created_at"`
41
+ SignInCount int32 `json:"sign_in_count"`
42
+ CurrentSignInAt time.Time `json:"current_sign_in_at"`
43
+ LastSignInAt time.Time `json:"last_sign_in_at"`
44
+ CurrentSignInIp string `json:"current_sign_in_ip"`
45
+ LastSignInIp string `json:"last_sign_in_ip"`
46
+ CreatedAt time.Time `json:"created_at"`
47
+ UpdatedAt time.Time `json:"updated_at"`
48
48
  }
49
49
  ```
50
50
 
@@ -58,19 +58,19 @@ ar2gostruct -o qbs
58
58
  // app/models/users.rb
59
59
  // Table name: users
60
60
  type Users struct {
61
- Id int32 'json:"id" qbs:"pk,notnull"'
62
- Email string 'json:"email" qbs:"notnull,default:''"'
63
- EncryptedPassword string 'json:"encrypted_password" qbs:"notnull,default:''"'
64
- ResetPasswordToken string 'json:"reset_password_token"'
65
- ResetPasswordSentAt time.Time 'json:"reset_password_sent_at"'
66
- RememberCreatedAt time.Time 'json:"remember_created_at"'
67
- SignInCount int32 'json:"sign_in_count" qbs:"default:'0'"'
68
- CurrentSignInAt time.Time 'json:"current_sign_in_at"'
69
- LastSignInAt time.Time 'json:"last_sign_in_at"'
70
- CurrentSignInIp string 'json:"current_sign_in_ip"'
71
- LastSignInIp string 'json:"last_sign_in_ip"'
72
- CreatedAt time.Time 'json:"created_at"'
73
- UpdatedAt time.Time 'json:"updated_at"'
61
+ Id int32 `json:"id" qbs:"pk,notnull"`
62
+ Email string `json:"email" qbs:"notnull,default:''"`
63
+ EncryptedPassword string `json:"encrypted_password" qbs:"notnull,default:''"`
64
+ ResetPasswordToken string `json:"reset_password_token"`
65
+ ResetPasswordSentAt time.Time `json:"reset_password_sent_at"`
66
+ RememberCreatedAt time.Time `json:"remember_created_at"`
67
+ SignInCount int32 `json:"sign_in_count" qbs:"default:'0'"`
68
+ CurrentSignInAt time.Time `json:"current_sign_in_at"`
69
+ LastSignInAt time.Time `json:"last_sign_in_at"`
70
+ CurrentSignInIp string `json:"current_sign_in_ip"`
71
+ LastSignInIp string `json:"last_sign_in_ip"`
72
+ CreatedAt time.Time `json:"created_at"`
73
+ UpdatedAt time.Time `json:"updated_at"`
74
74
  }
75
75
 
76
76
  ```
@@ -1,3 +1,3 @@
1
1
  module Ar2gostruct
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/ar2gostruct.rb CHANGED
@@ -65,7 +65,7 @@ module Ar2gostruct
65
65
  case col_type
66
66
  when "integer"
67
67
  type = TYPE_MAP["integer(#{col.limit})"] || "int32"
68
- type = "u#{col_type}" if col.sql_type.match("unsigned").present?
68
+ type = "u#{type}" if col.sql_type.match("unsigned").present?
69
69
  else
70
70
  type = TYPE_MAP[col_type] || "string"
71
71
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ar2gostruct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tatsuo Kaniwa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-11 00:00:00.000000000 Z
11
+ date: 2013-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake