Skip to content

Commit

Permalink
Rename packageKeywords to keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
earlbread committed Sep 23, 2017
1 parent 9009ab3 commit bbf9677
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/Nirum/Package/Metadata.hs
Expand Up @@ -7,7 +7,7 @@ module Nirum.Package.Metadata ( Author (Author, email, name, uri)
, version
, description
, license
, packageKeywords
, keywords
)
, MetadataError ( FieldError
, FieldTypeError
Expand Down Expand Up @@ -104,7 +104,7 @@ data Metadata t =
Metadata { version :: SV.Version
, description :: Maybe Text
, license :: Maybe Text
, packageKeywords :: Maybe Text
, keywords :: Maybe Text
, authors :: [Author]
, target :: (Eq t, Ord t, Show t, Target t) => t
}
Expand Down Expand Up @@ -201,7 +201,7 @@ parseMetadata metadataPath' tomlText = do
return Metadata { version = version'
, description = description'
, license = license'
, packageKeywords = keywords'
, keywords = keywords'
, authors = authors'
, target = target'
}
Expand Down
4 changes: 2 additions & 2 deletions src/Nirum/Targets/Python.hs
Expand Up @@ -123,7 +123,6 @@ import Nirum.Package.Metadata ( Author (Author, name, email)
, version
, description
, license
, packageKeywords
)
, MetadataError ( FieldError
, FieldTypeError
Expand All @@ -144,6 +143,7 @@ import Nirum.Package.Metadata ( Author (Author, name, email)
, versionField
)
import qualified Nirum.Package.ModuleSet as MS
import qualified Nirum.Package.Metadata as MD

minimumRuntime :: SV.Version
minimumRuntime = SV.version 0 6 0 [] []
Expand Down Expand Up @@ -1225,7 +1225,7 @@ setup(
pLicense :: Code
pLicense = fromMaybeToMeta $ license metadata'
pKeywords :: Code
pKeywords = fromMaybeToMeta $ packageKeywords metadata'
pKeywords = fromMaybeToMeta $ MD.keywords metadata'
strings :: [Code] -> Code
strings values = T.intercalate ", " $ map stringLiteral (L.sort values)
author :: Code
Expand Down
2 changes: 1 addition & 1 deletion test/Nirum/CodeBuilderSpec.hs
Expand Up @@ -40,7 +40,7 @@ package = Package { metadata = Metadata { version = SV.version 0 0 1 [] []
, authors = []
, description = Nothing
, license = Nothing
, packageKeywords = Nothing
, keywords = Nothing
, target = DummyTarget
}
, modules = modules'
Expand Down
6 changes: 3 additions & 3 deletions test/Nirum/PackageSpec.hs
Expand Up @@ -41,7 +41,7 @@ import Nirum.Package.Metadata ( Metadata ( Metadata
, version
, description
, license
, packageKeywords
, keywords
)
, MetadataError (FormatError)
, Target (targetName)
Expand All @@ -65,7 +65,7 @@ createValidPackage t = createPackage Metadata { version = SV.initial
, authors = []
, description = Nothing
, license = Nothing
, packageKeywords = Nothing
, keywords = Nothing
, target = t
} validModules

Expand Down Expand Up @@ -115,7 +115,7 @@ testPackage target' = do
, authors = []
, description = Nothing
, license = Nothing
, packageKeywords = Nothing
, keywords = Nothing
, target = target'
}
metadata package `shouldBe` metadata'
Expand Down
4 changes: 2 additions & 2 deletions test/Nirum/Targets/PythonSpec.hs
Expand Up @@ -43,7 +43,7 @@ import Nirum.Package.Metadata ( Author (Author, email, name, uri)
, version
, description
, license
, packageKeywords
, keywords
)
, Target (compilePackage)
)
Expand Down Expand Up @@ -104,7 +104,7 @@ makeDummySource' pathPrefix m renames =
]
, description = Just "Package description"
, license = Just "MIT"
, packageKeywords = Just "test example examples"
, keywords = Just "test example examples"
, target = Python "sample-package" minimumRuntime renames
}
pkg :: Package Python
Expand Down

0 comments on commit bbf9677

Please sign in to comment.